springcloud架構-HongHucommon-service專案構建過程
我們將對common-service整個專案進行剖析,將整個構建的流程給記錄下來,讓更多的關注者來參考學習。
首先在構建spring cloud的common-service之前,我們需要準備的技術:
Maven(專案構建)、Spring Boot、Spring Cloud、微服務概念、去中心化思想、分散式等,針對於common-service的頂級專案,這裡我們主要使用Maven來構建,閒話少說,我們直接上程式碼是最直觀的。
- 建立一個Maven的頂級專案,其中pom.xml檔案配置如下:
<?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>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-zipkin</module>
<module>particle-commonservice-admin</module>
<module>particle-commonservice-turbine</module>
<module>particle-commonservice-combine</module>
<module>particle-commonservice-sequence</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<!-- 框架通用包版本設定 -->
<validator.version>5.3.4.Final</validator.version>
<shiro.version>1.2.3</shiro.version>
<druid.version>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.version>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> -->
<!-- 通用工具包版本設定 -->
<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>
<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>5.5.1</dozer.version>
<email.version>1.4.7</email.version>
<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>Dalston.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jasig.cas.client</groupId>
<artifactId>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-admin-server</artifactId>
<version>${spring-boot-admin.version}</version>
</dependency>
<dependency>
<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-boot-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>${spring-boot-admin.version}</version>
</dependency>
<dependency>
<groupId>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-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.honghu</groupId>
<artifactId>component-base</artifactId>
<version>${com.ml.honghu.componet.version}</version>
</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.honghu</groupId>
<artifactId>component-sequence-api</artifactId>
<version>${com.ml.honghu.componet.version}</version>
</dependency>
<dependency>
<groupId>com.ml.honghu</groupId>
<artifactId>component-admin-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>
<version>${com.ml.honghu.componet.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
當前的pom.xml檔案引入了spring cloud相關版本配置,通用工具版本配置,honghu相關元件配置(因為其他的系統服務專案依賴於相關的元件,元件專案也是後面來建立的),我這邊會將近期研發的spring cloud微服務雲架構的搭建過程和精髓記錄下來,幫助更多有興趣研發spring cloud框架的朋友,大家來一起探討spring cloud架構的搭建過程及如何運用於企業專案。
完整專案的原始碼來源 技術支援1791743380
相關文章
- 整合spring cloud雲服務架構 - commonservice-eureka 專案構建過程SpringCloud架構
- (七)整合spring cloud雲服務架構 - common-service 專案構建過程SpringCloud架構
- 微服務分散式雲架構spring cloud - commonservice-eureka 專案構建過程微服務分散式架構SpringCloud
- (八)整合spring cloud雲服務架構 - commonservice-eureka 專案構建過程SpringCloud架構
- Android 原始碼分析(一)專案構建過程Android原始碼
- (七)Java B2B2C o2o多使用者商城 springcloud架構 - common-service 專案構建過程JavaSpringGCCloud架構
- (八)Java B2B2C o2o多使用者商城 springcloud架構- commonservice-eureka 專案構建過程JavaSpringGCCloud架構
- (三)springcloud微服務分散式雲架構-SpringCloud整合專案簡介SpringGCCloud微服務分散式架構
- SpringCloud構建微服務架構-Hystrix服務降級SpringGCCloud微服務架構
- iris-go 框架構建登陸 API 專案開發過程Go框架架構API
- 使用 .NET CLI 構建專案腳手架
- SpringCloud(一)——Eureka架構SpringGCCloud架構
- Android專案架構搭建Android架構
- 專案-整體架構架構
- 專案-安全架構架構
- CMAKE 《window構建專案》
- JAVA專案映象構建Java
- Maven 構建 Java 專案MavenJava
- Gradle構建SpringBoot專案GradleSpring Boot
- webpack快速構建專案Web
- Gradle之多專案構建Gradle
- 如何構建「大型 Node.js 專案」的專案結構?Node.js
- springcloud技術架構理解SpringGCCloud架構
- QtCreator透過CMake構建專案,修改專案名稱後報錯。QT
- Flutter UI架構啟動過程-11FlutterUI架構
- Kotlin/Native KMM專案架構Kotlin架構
- SpringMVC的專案架構思想SpringMVC架構
- Springboot專案架構設計Spring Boot架構
- Vue專案架構優化Vue架構優化
- 軟體架構風格——閉環架構風格(過程風格)架構
- 構建dubbo分散式平臺-maven構建根專案分散式Maven
- SpringCloud(五)將微服務專案構建成映象SpringGCCloud微服務
- 2. vite 構建專案Vite
- 使用Dockerfile構建django專案DockerDjango
- SpringBoot淺析——專案構建Spring Boot
- 使用Maven構建Java專案MavenJava
- 使用gradle構建springboot專案GradleSpring Boot
- 基於SpringCloud的Microservices架構實戰案例-架構拆解SpringGCCloudROS架構