(5) Integrate spring cloud cloud service architecture - cloud architecture code structure construction

The last article introduced the "Integrated Spring Cloud Cloud Service Architecture - Enterprise Distributed Microservice Cloud Architecture Diagram", in this article we build the code according to the architecture diagram. According to the microservice design idea, combined with some excellent projects of spring cloud, such as service discovery, governance, configuration management, routing load, security control and other excellent solutions, Maven technology is used to modularize, service, and atomically encapsulate the framework. And build, and prepare for the later grayscale release and continuous integration in advance.

In addition, before setting up the environment, you need to be proficient in the use of maven and the handling of related problems (not repeated here).

The Spring Cloud cloud architecture uses maven to build. The use of maven is not only the control of jar packages, but also to grasp a core role of maven, that is, to divide the entire project in a modular way, and to understand the relationship between business and business. Coupling, and then the modular business is serviced or componentized, so that any project or platform business can be transplanted.

Finally, we must consider the fine-grained splitting of services, such as: a login module, we can service all services related to login (basic information verification; user name, email, mobile phone verification login; mobile phone verification code acquisition ; verify whether the user is bound, etc.), and finally arrange services for multiple services, thus achieving the current microservice architecture.

The above is some of my experience in the project or architecture to share with you, gossip less, let's talk about the code structure of the entire architecture:

1. System Services

2. Common Components

3. Business Services

Today I just briefly described the code structure of the HongHu cloud architecture. In the next article, we will introduce the function, usage instructions, design ideas, etc. of each code structure in detail.

From now on, I will record the construction process and essence of the recently developed spring cloud microservice cloud architecture to help more friends who are interested in developing the spring cloud framework. Let's discuss the construction process and how of the spring cloud architecture together. Used in enterprise projects.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326203963&siteId=291194637