SpringCloud是微服务领域比较成熟的整体解决方案,包括了众多的规范和参考实现,如:eureka,config,zuul,openfeign等。springcloud alibaba参考实现基于生产环境的经验积累,受到了大家越来越多的重视,但其版本对应关系 与spring cloud默认实现有所不同。
其基本架构是:
- springcloud官方实现与springboot的对应关系,应该按照如下 表所示的版本进行对应,不然就会有各种错误与冲突。
Table 1. Release train Spring Boot compatibility Release Train Boot Version Hoxton
2.2.x
Greenwich
2.1.x
Finchley
2.0.x
Edgware
1.5.x
Dalston
1.5.x
- springcloud alibaba实现与spring cloud、spring boot的对应关系
The Spring Cloud Alibaba & Spring Cloud & Spring Boot compatibility table:
Spring Cloud Version
Spring Cloud Alibaba Version
Spring Boot Version
--------
--------
--------
Spring Cloud Greenwich
2.1.x.RELEASE
2.1.x.RELEASE
Spring Cloud Finchley
2.0.x.RELEASE
2.0.x.RELEASE
Spring Cloud Edgware
1.5.x.RELEASE
1.5.x.RELEASE
- springcloud官方实现开始(Getting Started),以Greenwich版本为例:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.6.RELEASE</version> </parent> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Greenwich.SR5</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
- springcloud alibaba实现的Getting Started,以Greenwich版本为例:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.6.RELEASE</version> </parent> <dependencyManagement> <dependencies> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-alibaba-dependencies</artifactId> <version>2.1.0.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>