SpringBoot 和 Spring Cloud版本依赖关系
以下内容均体现在Spring Cloud官网。

0)Spring Cloud版本名变更
从2020.0.X版本开始,Spring Cloud版本的命名方式修改为时间线的方式。

而SpringCloud之前的版本名称是伦敦地铁站的站名命名,且首字母顺序与版本时间顺序一致,如:

Angel
Brixton
Camden
Dalston
Edgware
Finchley
Greenwich
Hoxton

还是伦敦地铁站的站名命名版本时,当SpringCloud的发布内容积累到临界点或者一个重大Bug被解决后,会发布一个"Service Releases"版本,简称"SR"版本(参考官网:https://github.com/spring-clo...)。其中也包括相关组件的版本,比如:Spring Cloud Netflix 2.2.9 RELEASE。

而从2020.0.X版本开始,则是数字递增的方式:

SpringCloud与SpringBoot的版本对应关系,可以通过以下三种方式来确定:

1)SpringCloud发布版本与SpringBoot版本兼容性的表格

表中描述的是一个版本范围;比如与SpringCloud Hoxton版本适配的SpringBoot版本应该是2.2.x版本 或 2.3.x(SR5开始以上)的版本。

2)访问https://start.spring.io/actua...

JSON格式化后的Spring Cloud版本内容如下:

3)Spring Cloud参考文章中会推荐使用Spring Boot版本

这种方式最精准。

2、SpringCloud 和 SpringCloudAlibaba版本对应关系
spring Cloud Alibaba官方版本声明:https://github.com/alibaba/sp...

2)Spring Cloud alibaba 组件版本关系

3、依赖管理
Spring Cloud Alibaba BOM 中包含了它所使用的所有依赖的版本。

我们只需要在<dependencyManagement>标签中 添加如下内容:

<project>

.....

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>2.3.7.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <!--整合spring cloud-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Hoxton.SR8</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <!--整合spring cloud alibaba-->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-alibaba-dependencies</artifactId>
            <version>2.2.5.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

</project>


唯hkkf5566
1 声望2 粉丝