In the previous article we introduced the integration of Spring Cloud service architecture-Honghu Cloud architecture Common-service Code Structure analysis, this section we will common-service the entire project to be analyzed, the entire construction process to record, Let more followers refer to the study.
First, before building the common-service of Spring cloud, we need to prepare the technology:
MAVEN (project Building), Spring Boot, Spring Cloud, microservices concept, decentralized thinking, distributed, etc., for top-of-the-line projects in Common-service, where we mainly use Maven to build, gossip less, we directly on the code is the most intuitive.
1. Create a MAVEN top-level project where the Pom.xml file is configured as follows:
<?xml version= "1.0" encoding= "UTF-8"? ><project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http ://www.w3.org/2001/XMLSchema-instance "xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelversion>4.0.0 </modelVersion><parent> <groupId>org.springframework.cloud</groupId> <artifactid& Gt;spring-cloud-starter-parent</artifactid> <version>Dalston.RELEASE</version> <relativ Epath/> </parent> <groupId>com.ml.honghu</groupId> <artifactid>particle-commonservic e</artifactid> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <na Me>particle-commonservice</name> <description>particle-commonservice Project for Spring boot</description> <modules> <module>particle-commonservice-config</module> <module>particle-commonservice-eureka</module> <MODULE>PARTICLE-COMMONSERVICE-MQ</MODULE&G T <module>particle-commonservice-cache</module> <module>particle-commonservice-sso</module > <module>particle-commonservice-apigateway</module> <module>particle-commonservice-zip Kin</module> <module>particle-commonservice-admin</module> <module>particle-commonse Rvice-turbine</module> <module>particle-commonservice-combine</module> <module>parti cle-commonservice-sequence</module> </modules> <properties> <project.build.sourceencodi Ng>utf-8</project.build.sourceencoding> <project.reporting.outputencoding>utf-8</ Project.reporting.outputencoding> <java.version>1.8</java.version> <!--Framework Universal package version Settings-<validator.version& Gt;5.3.4.final</validator.version> <shiro.version>1.2.3</shiro.version> <druid.version& Gt;1.0.26</druid.version> <mybatis-spring.version>1.2.2</mybatis-spring.version> <shiro .version>1.2.3</shiro.version> <druid.version>1.0.11</druid.version> <ehcache.versio N>2.6.9</ehcache.version> <ehcache-web.version>2.0.4</ehcache-web.version> <sitemesh .version>2.4.2</sitemesh.version> <activiti.version>5.15.1</activiti.version> <wink. Version>1.4</wink.version> <sso.client.version>3.4.1</sso.client.version> <! --General Toolkit version settings-<slf4j.version>1.7.7</slf4j.version> <commons-lang3.version>3.3.2</ Commons-lang3.version> <commons-io.version>2.4</commons-io.version> <commons-codec.version>1.9</ Commons-codec.version> <commons-fileupload.version>1.3.1</commons-fileupload.version> <com Mons-beanutils.version>1.9.1</commons-beanutils.version> <fastjson.version>1.1.40</ Fastjson.version> <xstream.version>1.4.7</xstream.version> <GUAVA.VERSION>17.0</GUAV A.version> <dozer.version>5.5.1</dozer.version> <email.version>1.4.7</email.version& Gt <poi.version>3.9</poi.version> <cglib.version>3.2.5</cglib.version> <!-- Aliyun-<aliyun-sdk-oss.version>2.6.0</aliyun-sdk-oss.version> <aliyun-sdk-openservices -ons.version>1.2.7.final</aliyun-sdk-openservices-ons.version> <com.ml.honghu.componet.version> 0.0.1-snapshot</com.ml.honghu.componet.veRsion> <spring-boot-admin.version>1.5.1</spring-boot-admin.version> <fastjson.version>1 .2.35</fastjson.version> </properties> <dependencyManagement> <dependencies> <!--Spring Cloud--<dependency> <groupId>org.springframework.cloud< /groupid> <artifactId>spring-cloud-dependencies</artifactId> <version>d Alston. Release</version> <type>pom</type> <scope>import </scope> </dependency> <dependency> <groupid>org. Jasig.cas.client</groupid> <artifactId>cas-client-core</artifactId> <ve rsion>3.4.1</version> </dependency> <dependency> < ;groupid>io.springfox</groupid> <artifactId>springfox-swagger2</artifactId> <version>2.5.0</version> </dependency> <dependency> < Groupid>de.codecentric</groupid> <artifactId>spring-boot-admin-server</artifactId> <version>${spring-boot-admin.version}</version> </dependency> <depe Ndency> <groupId>de.codecentric</groupId> <artifactid>spring-boot-admin -server-ui</artifactiD> <version>${spring-boot-admin.version}</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactid>spring-b Oot-admin-server-ui-hystrix</artifactid> <version>${spring-boot-admin.version}</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server-ui-turbine</artifactId> <VERSION>${SP ring-boot-admin.version}</version> </dependency> <dependency> <g Roupid>de.codecentric</groupid> <artifactid>spring-boot-admin-server-ui-login</artifactid > <version>${spring-boot-admin.version}</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactid>spring-boot-admin-server-ui-activ Iti</artifactid> <version>${spring-boot-admin.version}</version> </dependen cy> <dependency> <groupId>org.slf4j</groupId> <artifactid >slf4j-api</artifactId> <version>1.7.25</version> </dependency> <dependency> <groupId>com.ml.honghu</groupId> <artifactid>comp Onent-base</artifactid> <version>${com.ml.honghu.componet.version}</version> & Lt;/dependency> <dependency> <groupId>com.ml.honghu</groupId> <artifactId>component-redis</artifactId> <version>${com.ml.honghu.componet.version}< /version></dependency> <dependency> <groupId>com.ml.honghu</groupId> <artifactId>component-utils</artifactId> <version>${com.ml.honghu.componet.version} </version> </dependency> <dependency> <groupid>com.ml.hong Hu</groupid> <artifactId>component-sequence-api</artifactId> <VERSION&G T;${com.ml.honghu.componet.version}</version> </dependency> <dependency> <groupId>com.ml.honghu</groupId> <artifactid>component-admin-ui-zipkin</artif Actid> <version>${com.ml.honghu.componet.version}</version> </dependency> <dependency> <groupId>com.ml.honghu</groupId> <artifactid& Gt;component-admin-ui-roUte</artifactid> <version>${com.ml.honghu.componet.version}</version> </DEP endency> <dependency> <groupId>com.ml.honghu</groupId> &L T;artifactid>component-zuul-label</artifactid> <version>${com.ml.honghu.componet.version}< ;/version> </dependency> </dependencies> </dependencyManagement></project>
The current Pom.xml file introduces spring cloud related version configuration, generic tool version configuration, Honghu related component configuration (because other system service projects depend on related components, and component projects are created later)
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 Source technical support for complete projects 1791743380
Spring Cloud Cloud Services-Honghu Architecture Common-service Project Build process