The previous article introduced the basic architecture diagram of Spring Cloud cloud service architecture, and we built the code based on the architecture diagram. Based on the concept of micro-service design, combined with spring Cloud's own service discovery, governance, configuration management, distributed and other excellent solutions, we use MAVEN technology to modular, service, atomic encapsulation, but also for the later hot-plug, continuous integration to do some preparatory work.
In addition, before setting up the environment, we need to master the use of Maven and the handling of related abnormal problems.
The particle cloud architecture is built using MAVEN, and using Maven is not just a jar-package control, it's important to capture the central role of Maven, which is to divide the entire project into a modular way, decoupling business from business, The modular business is then serviced or modularized so that any project or platform can be ported for business.
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 validation; user name, mailbox, mobile phone authentication login, mobile phone Verification Code acquisition, verify the user is bound, etc.), and finally for the service of multi-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:
650) this.width=650; "Id=" img "src=" http://img0.ph.126.net/4gT9JjWyRA4F1fqdCoOecw==/6632311313352609378.jpg?_= 7562987 "style=" Border:none; "alt=" 6632311313352609378.jpg?_=7562987 "/>
650) this.width=650; "Src=" http://img2.ph.126.net/-JjjTT89eu9-ouOwA21dFg==/2590132735710010982.jpg?_=7562987 " Style= "Border:none;" alt= "2590132735710010982.jpg?_=7562987"/>
Description, the entire microservices architecture is divided into four parts:
Part I: Basic framework Encapsulation for General Service (entity, DAO, Service, Controller, API), etc.
The second part: Spring Cloud General micro-service project, can monitor the left and right micro-services, of course, itself is also micro-services.
Part III: The encapsulation of all components within the framework can be implanted into any module project.
Part IV: HONGHU Business micro-services, such as: Members, messages, payments, orders, search, merchandise, shops, shopping carts, collections and so on.
Today is just a brief description of the particle 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.
Welcome everyone and I together to build a large-scale Internet distributed enterprise Micro-service cloud architecture, I will build the detailed steps of the structure of the record down, as a reference to learn from the future, interested can add my QQ (2147775633), hope to help more good scholar
(iii) Integration of Spring cloud services architecture-particle Cloud architecture Code structure building