spring boot 2.2+
springcloud Hoxton+
springcloud alibaba 2.2.1+
# 00.整合思路分析
- springcloud eureka consul ribbon openfeign hystix config+bus gateway
- springcloudalibaba nacos服务注册中&统一配置中心 sentinel 服务熔断 限流 ...
整合思路:
1.服务注册中心 nacos
2.统一配置中心 nacos
3.服务熔断组件 sentinel
4.服务间通信组件 openfeign + ribbon
5.服务网关组件 gateway
# 0.构建项目并引入依赖
<!--继承springboot父项目-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR6</spring-cloud.version>
<spring.cloud.alibaba.version>2.2.1.RELEASE</spring.cloud.alibaba.version>
</properties>
<dependencyManagement>
<dependencies>
<!--引入springcloud alibaba-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring.cloud.alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--引入springcloud-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>