In this article we build our code based on the architecture diagram. According to the concept of microservices design, combining some excellent projects of spring cloud, such as service discovery, governance, configuration management, routing load, security control and other excellent solutions, use MAVEN technology to modularize, service, and atomically encapsulate and build the framework. Also for the post-grayscale publishing, continuous integration in advance to prepare for the work.
In addition, before setting up the environment, you need to master the use of Maven and related issues (not repeated here).
Honghu Cloud architecture using MAVEN to build, using MAVEN is not just a jar package control, it is important to seize a central role of Maven, that is, the entire project in a modular way, business and business decoupling, and then the modular business service or component , so that you can do any project or platform business porting.
Finally, consider the fine-grained division of services, such as: A login module, we can all the services related to the login service (basic information verification; user name, email, mobile phone authentication login, mobile phone Verification Code acquisition, verify the user is bound, etc.), and finally for multi-service service orchestration, In this way, the micro-service architecture is being done.
These are some of my experiences in doing projects or architectures to share with everyone, gossip less, the following is the code structure of the entire architecture:
1. System Services
650) this.width=650; "height=" 274 "src=" https://static.oschina.net/uploads/space/2017/1008/005259_6y7U_3613013. PNG "width=" 489 "style=" Border:none;margin:auto;height:auto; "/>
2. General-Purpose components
650) this.width=650; "height=" 353 "src=" https://static.oschina.net/uploads/space/2017/1008/005318_7gu5_3613013. PNG "width=" 455 "style=" Border:none;margin:auto;height:auto; "/>
3. Business Services
650) this.width=650; "height=" 811 "src=" https://static.oschina.net/uploads/space/2017/1008/005341_tNRK_3613013. JPG "width=" 501 "style=" Border:none;margin:auto;height:auto; "/>
650) this.width=650; "height=" 652 "src=" https://static.oschina.net/uploads/space/2017/1008/005357_v5eV_3613013. JPG "width=" 569 "style=" Border:none;margin:auto;height:auto; "/>
Today is just a brief description of the Honghu Cloud architecture code structure, the next one we will detail the function of each code structure, the use of instructions, design ideas and so on.
From now on, I will be documenting the process and essence of the recent development of the spring cloud micro-service cloud architecture to help more friends who are interested in developing the Spring cloud framework to explore the process of building the spring cloud architecture and how to use it in enterprise projects. Source of information source
Building code structure for integrated Spring Cloud cloud service architecture