当前位置:网站首页>Using jhipster to build microservice architecture
Using jhipster to build microservice architecture
2022-06-23 03:34:00 【Micro Stone】
In this paper , We will look at code generation tools JHipster Microservice architecture generated and supported .
JHipster Is a code generation tool , It can be for Kubernetes establish Web Applications 、 Microservices 、 Deployment file 、 Cloud integration and CI/CD Jenkins file . This tool is very helpful for developers who can quickly generate code and avoid creating boilerplate code , Can save 30% The amount of work .
JHipster Support Spring Boot The back-end code and Angular/React/Vue.js Front end code in .
In this paper , We will study JHipster Microservice architecture generated and supported .
Microservices are independent 、 Modular deployable components , By business domain model 、 Scalable 、 Efficient and rapidly deployable business function splitting .
Microservices consist of several components , Including service registration 、 Service discovery 、 health examination 、 elastic 、 Fault tolerance and security .
JHipster The following microservice components are supported to complete the above components :
1. JHipster Registry: This is the service registry , Different microservices can be registered and found here . The registry also provides monitoring and health check dashboards .
JHipster Registry Based on the 2 Components :Netflix Eureka and Spring Cloud Config Server.
a、Netflix Eureka:Eureka Provide dynamic service registration and discovery .Eureka Maintains a central service registry , You can register a new microservice and take it off the shelf when the service goes down . The registry maintains up-to-date information about available services and their metadata . Sign up to Eureka The server's services send their heartbeats , When the client no longer sends heartbeat , The service will be removed from the registry .
Eureka Provide dynamic discovery , The client looks up the service registry to get service information , For example, the service of URL, And pass URL Connect .

b、Spring Cloud Config Server: This provides centralized storage for managing the properties and configurations of all microservices .
Microservices can be connected to cloud-config Service and get configuration details . Configuration services can also be exposed to Rest API.

2、HashiCorp Consul: Consul Is from HashiCorp Service discovery client for .Consul Provide service discovery for key value stores 、 Fault tolerance 、Vault. This is a JHipster Registry alternatives , It can provide service discovery and configuration storage .
Eureka Support with Spring Boot Written application services .Consul Can support the use of Java、Golang Or multiple clients written in other programming languages .
Consul Support multiple data centers out of the box . function Consul The node of runs a consul Agent to monitor the health of the service .
3. JHipster API gateway
JHipster Provide gateway , It is a single entry point to access services . The gateway provides the request 、 Response conversion 、API Security 、 cache 、 throttle 、 route 、 Filtering and fault tolerance .
JHipster The gateway is integrated for API Gateway function Zuul And for elastic and circuit breaker functions Hystrix. Because in the future will delete to Hystrix Support for , therefore JHipster Are looking for Resilience4J Integrated to achieve circuit breaker function .
Hystrix or Resilience4J Prevent cascading failures in distributed systems , Enable fallback service , Control system delay .
JHipster API Gateway Will work with JHipster Registry Use it together Spring Cloud Load Balancer Service discovery and load balancing HTTP request .

4. JHipster Control Center: The control center monitors and manages applications . The control center provides the following functions :
a、Instances: Instances Provides a list of application instances ; When services are in JHipster Registry Registration in China , The service is available in the instance list . It also provides a dashboard to view the list .
b. Metrics: The indicators are Micrometer management , The Micrometer Track system metrics , Such as JVM、HTTP request 、 Cache usage and database connections .
C、 health examination : Health examination and Spring Actuator Integration to get the health status of the service .
d、 journal : Journal and Logback Integrate , Logs for tracking running applications .
e. API file :API Documentation provides Swagger APIn file .
5. JWT The security of : JWT Is a stateless security mechanism , It can be extended to multiple servers . This is a JHipster Default security options for microservices .
JWT Provide Header、Payload and Signature. All client session data is stored in the token .JWT There is no server-side session management in .OAuth 2.0 Support JWT For secure transmission .

6. JHipster UAA Microservice security : JHipster UAA It's using OAuth2 User billing and authoring microservices .
OAuth2 Is an authorization framework that can be used for centralized identity management .JHipster UAA Provides a OAuth2 Endpoint , The endpoint provides an access token based on authentication . Tokens provide fine-grained access control to access information based on Rest Service for .UAA It is a combination of authorization server and resource server .
Example OAuth The process is as follows :

Use JHipster The instance architecture generated for the microservice is as follows :

This paper introduces JHipster Different microservice components supported , Let you know how to use JHipster Build the microservices architecture . Thank you for reading !
边栏推荐
- The compatibility of remotefx schemes is related to multiple factors
- Postman calls relevant interfaces of CLS API 3.0
- Customization of openfeign
- Gakataka student end to bundle Version (made by likewendy)
- 1058 multiple choice questions (20 points)
- Easysearcher cannot find the IP address of easynvr hardware. How to solve it?
- Regeorg actual attack and defense
- How to share small programs released by wechat
- Learning summary of spanquery source code
- Know res.send() and res.end() of Express
猜你喜欢

【机器学习】 吴恩达机器学习作业 ex2逻辑回归 Matlab实现

LRU cache

Gakataka student end to bundle Version (made by likewendy)

mysql 数据恢复 (.ibdata1, bin log)

innodb_ruby 视角下 MySQL 记录增删改

Static code block, code block, constructor execution order

新版kali切换最高账户

1058 multiple choice questions (20 points)

1-1VMware介绍
![Analysis on demand and market scale of China's steamed stuffed bun industry in 2020 [figure]](/img/4b/dd272f98b89a157180bf68570d2763.jpg)
Analysis on demand and market scale of China's steamed stuffed bun industry in 2020 [figure]
随机推荐
Email authentication bypass
Analysis on the development of duty-free industry in Hainan Province in 2021: the implementation of the new policy makes the duty-free market in Hainan more "prosperous" [figure]
[Alibaba middleware technology series] "Nacos technology" service registration and discovery related principle analysis
Bi skills - authority control
1-1VMware介绍
Record an edusrc vulnerability mining
Nature: correlation between oscillatory signals and gene expression supporting human episodic memory coding
Preliminary sequencing problem
The primary level of SAP retail uses the transaction code wrfmatcopy to create commodity master data
Easysearcher cannot find the IP address of easynvr hardware. How to solve it?
Generate PDF417 code in batch through TXT file
Intelligent voice climbing patio
Analysis on the development prospect of China's brain computer interface industry in 2021: wide application prospect, sustained and rapid growth of market scale [figure]
Fetch request details
Know res.send() and res.end() of Express
线上MySQL的自增id用尽怎么办?
Apicloud native module, H5 module and multi terminal component tutorial
TRTC zero foundation -- Video subscription on the code
Troubleshooting and solution of error 400 in easygbs video platform
How does easyplayer embed a video snapshot into a demo?