SpringBoot、SpringCloud、SpringCloudAlibaba版本对照表

 

SpringCloudAlibaba官方提供的版本对照表: 

https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E

https://github.com/alibaba/spring-cloud-alibaba/wiki/版本说明

这个wiki更新的也不是很及时,所以大家想用最新的版本,兼容性还需要自己测试。

 

1 SpringBoot、SpringCloud、SpringCloudAlibaba 毕业版本依赖关系(推荐使用)

Spring Cloud Alibaba Version Spring Cloud Version Spring Boot Version
2.2.7.RELEASE Spring Cloud Hoxton.SR12 2.3.12.RELEASE
2021.1 Spring Cloud 2020.0.1 2.4.2
2.2.6.RELEASE Spring Cloud Hoxton.SR9 2.3.2.RELEASE
2.2.3.RELEASE Spring Cloud Hoxton.SR8 2.3.2.RELEASE
2.2.1.RELEASE Spring Cloud Hoxton.SR3 2.2.5.RELEASE
2.2.0.RELEASE Spring Cloud Hoxton.RELEASE 2.2.X.RELEASE
2.1.3.RELEASE Spring Cloud Greenwich.SR6 2.1.13.RELEASE
2.1.2.RELEASE  Spring Cloud Greenwich 2.1.X.RELEASE
2.0.3.RELEASE Spring Cloud Finchley 2.0.X.RELEASE
1.5.1.RELEASE(停止维护,建议升级)   Spring Cloud Edgware 1.5.X.RELEASE

 

2 Spring Cloud Alibaba 各组件版本对照

  每个Spring Cloud Alibaba 版本及其所适配的各组件对应版本关系(经过验证,自行搭配组件版本不保证可用)

Spring Cloud Alibaba Version Sentinel Version Nacos Version

RocketMQ Version

Dubbo Version

Seata Version

2.2.7.RELEASE 1.8.1 2.0.3 4.6.1 2.7.13 1.3.0
2.2.6.RELEASE 1.8.1 1.4.2 4.4.0 2.7.8 1.3.0
2021.1 or 2.2.5.RELEASE or 2.1.4.RELEASE or 2.0.4.RELEASE  1.8.0 1.4.1 4.4.0 2.7.8 1.3.0
2.2.3.RELEASE or 2.1.3.RELEASE or 2.0.3.RELEASE  1.8.0 1.3.3 4.4.0 2.7.8 1.3.0
2.2.1.RELEASE or 2.1.2.RELEASE or 2.0.2.RELEASE 1.7.1 1.2.1 4.4.0 2.7.6 1.2.0
2.2.0.RELEASE 1.7.1 1.1.4 4.4.0 2.7.4.1 1.0.0
2.1.1.RELEASE or 2.0.1.RELEASE or 1.5.1.RELEASE 1.7.0 1.1.4 4.4.0 2.7.3 0.9.0
2.1.0.RELEASE or 2.0.0.RELEASE or 1.5.0.RELEASE 1.6.3 1.1.1 4.4.0 2.7.3 0.7.1

 

3  Jar包指定版本的使用

  既然是 SpringCloud 和 SpingCloudAlibaba 继承的项目,涉及多套版本的控制。我们可以在项目的总 pom.xml 里指定版本号,子项目就不需要在单独指定了,避免混淆。

  在 pom.xml 中不建议使用  parent 方式来指定版本号,因为 parent 只能指定其中一个版本,除非你自己定义一个 parent module,在parent modele 中把版本都定义好,在使用 parent 来引用这个parent module。推荐使用 dependencyManagement 的方式

复制代码
    <properties>
        <java.version>1.8</java.version>
        <java.encoding>UTF-8</java.encoding>
        <project.build.locale>zh_CN</project.build.locale>
        <spring.boot.version>2.1.4.RELEASE</spring.boot.version>
        <spring.cloud.version>Greenwich.SR1</spring.cloud.version>
        <spring.cloud.alibaba.version>2.1.3.RELEASE</spring.cloud.alibaba.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- SpringBoot -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring.boot.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>

            <!-- 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>
        </dependencies>
    </dependencyManagement>
复制代码

 

posted @   闲人鹤  阅读(5612)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示