(5) Integration of spring cloud service architecture – code structure construction of Cloud Architecture

Time:2021-6-24

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

  1. system service

(5) Integration of spring cloud service architecture - code structure construction of Cloud Architecture

  1. Common components

(5) Integration of spring cloud service architecture - code structure construction of Cloud Architecture

  1. Business services

(5) Integration of spring cloud service architecture - code structure construction of Cloud Architecture
(5) Integration of spring cloud service architecture - code structure construction of Cloud Architecture
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.

Recommended Today

Implementation example of go operation etcd

etcdIt is an open-source, distributed key value pair data storage system, which provides shared configuration, service registration and discovery. This paper mainly introduces the installation and use of etcd. Etcdetcd introduction etcdIt is an open source and highly available distributed key value storage system developed with go language, which can be used to configure sharing […]