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.
- 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> <group Id>org.springframework.cloud</groupid> <artifactid>spring-cloud-starter-parent</artifactid > <version>Dalston.RELEASE</version> <relativepath/> </parent> <groupid >com.ml.honghu</groupId> <artifactId>particle-commonservice</artifactId> <version> 0.0.1-snapshot</version> <packaging>pom</packaging> <name>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> <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.sourceencodin G>utf-8</project.build.sourceencoding> <project.reporting.outputencoding>utf-8</ Project.reporting.outputencoding> <java.version>1.8</java.version> <!--Framework Universal Package version set-- <validator.version>5.3.4.Final</validator.version> <shiro.version>1.2.3</shiro.version> <druid.version>1.0.26</drui D.version> <mybatis-spring.version>1.2.2</mybatis-spring.version> <shiro.version>1.2.3& Lt;/shiro.version> <druid.version>1.0.11</druid.version> <EHCACHE.VERSION>2.6.9</EHC Ache.version> <ehcache-web.version>2.0.4</ehcache-web.version> <sitemesh.version>2.4.2& Lt;/sitemesh.version> <activiti.version>5.15.1</activiti.version> <wink.version>1.4< /wink.version> <sso.client.version>3.4.1</sso.client.version> <!--Universal Toolkit version Settings-- <slf4j.version>1.7.7</slf4j.version> <commons-lang3.version>3.3.2</commons-lang3.versi On> <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> <commons-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</guava.version> <DOZER.VERSION&G T;5.5.1</dozer.version> <email.version>1.4.7</email.version> <poi.version>3.9</po I.version> <cglib.version>3.2.5</cglib.version> <!--Aliyun--<aliyun-sdk-o Ss.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&Gt </properties> <dependencyManagement> <dependencies> <!--Spring Cloud-- <dependency> <groupId>org.springframework.cloud</groupId> <arti Factid>spring-cloud-dependencies</artifactid> <version>Dalston.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.jasig.cas.client</groupId> <artifacti D>cas-client-core</artifactid> <version>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-adm In-server</artifactid> <version>${spring-boot-admin.version}</version> </de pendency> <dependency> <groupId>de.codecentric</groupId> < ;artifactid>spring-boot-admin-server-ui</artifactid> <VERSION>${SPRING-BOOT-ADMIN.VERSION}&L t;/version> </dependency> <dependency> <GROUPID>DE.CODECENTRIC&L T;/groupid> <artifactId>spring-boot-admin-server-ui-hystrix</artifactId> < Version>${spring-boot-admin.version}</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactid>spring-boot-admin-server-ui-turbi Ne</artifactid> <version>${spring-boot-admin.version}</version> </dependency> <DEP Endency> <groupId>de.codecentric</groupId> <artifactid>spring-boot-admi N-server-ui-login</artifactid> <version>${spring-boot-admin.version}</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-server-ui-activiti</artifactId> <version>${spring-boot -admin.version}</version> </dependency> <dependency> <groupid> ;org.slf4j</groupid> <artifactId>slf4j-api</artifactId> <version>1.7 .25</version> </dependency> <dependency> <groupid>com.ml.hong Hu</groupid> <artifactId>component-base</artifactId> <version>${com.ml.honghu.componet.versi on}</version> </dependency> <dependency> <groupid>com.ml.hong Hu</groupid> <artifactId>component-redis</artifactId> <version>${com .ml.honghu.componet.version}</version> </dependency> <dependency> & Lt;groupid>com.ml.honghu</groupid> <artifactId>component-utils</artifactId> <version>${com.ml.honghu.componet.version}</version> </dependency> <depend Ency> <groupId>com.ml.honghu</groupId> <artifactid>component-sequence-a Pi</artifactid> <version>${com.ml.honghu.componet.version}</version> </depe Ndency> <dependency> <groupId>com.ml.honghu</groupId> <artifactid>component-ad Min-ui-zipkin</artifactid> <version>${com.ml.honghu.componet.version}</version> </dependency> <dependency> <groupId>com.ml.honghu</groupId> <artifactId>component-admin-ui-route</artifactId> <version>${com.ml.honghu.componet. version}</version> </dependency> <dependency> <groupid>com.ml .honghu</groupid> <artifactId>component-zuul-label</artifactId> <versio N>${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)
Source source technical support for complete projects 1791743380
Spring Cloud Cloud Services-Honghu Architecture Common-service Project Build process