SpringBoot、SpringCloud、SpringCloudAlibaba版本对照表

596 阅读1分钟

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

github.com/alibaba/spr…

github.com/alibaba/spr…

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

 

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

Spring Cloud Alibaba VersionSpring Cloud VersionSpring Boot Version
2.2.7.RELEASESpring Cloud Hoxton.SR122.3.12.RELEASE
2021.1Spring Cloud 2020.0.12.4.2
2.2.6.RELEASESpring Cloud Hoxton.SR92.3.2.RELEASE
2.2.3.RELEASESpring Cloud Hoxton.SR82.3.2.RELEASE
2.2.1.RELEASESpring Cloud Hoxton.SR32.2.5.RELEASE
2.2.0.RELEASESpring Cloud Hoxton.RELEASE2.2.X.RELEASE
2.1.3.RELEASESpring Cloud Greenwich.SR62.1.13.RELEASE
2.1.2.RELEASE Spring Cloud Greenwich2.1.X.RELEASE
2.0.3.RELEASESpring Cloud Finchley2.0.X.RELEASE
1.5.1.RELEASE(停止维护,建议升级)  Spring Cloud Edgware1.5.X.RELEASE

 

2 Spring Cloud Alibaba 各组件版本对照

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

Spring Cloud Alibaba VersionSentinel VersionNacos VersionRocketMQ VersionDubbo VersionSeata Version
2.2.7.RELEASE1.8.12.0.34.6.12.7.131.3.0
2.2.6.RELEASE1.8.11.4.24.4.02.7.81.3.0
2021.1 or 2.2.5.RELEASE or 2.1.4.RELEASE or 2.0.4.RELEASE 1.8.01.4.14.4.02.7.81.3.0
2.2.3.RELEASE or 2.1.3.RELEASE or 2.0.3.RELEASE 1.8.01.3.34.4.02.7.81.3.0
2.2.1.RELEASE or 2.1.2.RELEASE or 2.0.2.RELEASE1.7.11.2.14.4.02.7.61.2.0
2.2.0.RELEASE1.7.11.1.44.4.02.7.4.11.0.0
2.1.1.RELEASE or 2.0.1.RELEASE or 1.5.1.RELEASE1.7.01.1.44.4.02.7.30.9.0
2.1.0.RELEASE or 2.0.0.RELEASE or 1.5.0.RELEASE1.6.31.1.14.4.02.7.30.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>