The previous article introduced the “integrated spring cloud cloud service architecture – enterprise distributed micro service Cloud Architecture Diagram”. In this article, we build the code according to the architecture diagram. According to the micro service design idea, combined with some excellent spring cloud projects, such as service discovery, governance, configuration management, routing load, security control and other excellent solutions, Maven technology is used to modularize, service and atomize the framework and build it, which also makes preparations for the gray release and continuous integration in the later stage.
In addition, before building the environment, you need to be familiar with the use of Maven and the handling of related problems.
Spring cloud architecture uses Maven to build. Using Maven is not only the control of jar package, but also the core role of maven, which is to divide the whole project in a modular way, decouple business from business, and then service or component modular business, In this way, any project or platform can be transplanted.
Finally, we need to consider the fine-grained splitting of services. For example, a login module can serve all the businesses 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 the services for multiple services, so as to achieve the micro service architecture in progress.
The above is my experience in doing projects or architectures. Let’s talk less about the code structure of the whole architecture
- system service
- Common components
- Business services
Today, we just briefly describe the code structure of Honghu Cloud Architecture. In the next article, we will introduce in detail the functions, instructions and design ideas of each code structure.
From now on, I will record the construction process and essence of the recently developed spring cloud microservice Cloud Architecture, so as to help more friends who are interested in developing spring cloud framework. Let’s discuss the construction process of spring cloud architecture and how to apply it to enterprise projects.