maven仓库地址

  1. spring-cloud-dependencies 版本列表可查看: https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies
  2. spring-boot-starter-parent 版本列表可查看: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent

SpringCloud命名方式

  • 旧采用伦敦地铁站命名,其中按照地铁首字母A-Z依次命令如 Hoxton.SR9

  • 开发的快照版本(BUILD-SNAPSHOT)到里程碑版本(M),

  • 开发的差不多到会发布的候选发布版(RELEASE)

  • 最后到正式版(SR)版本。

    1
    2
    3
    4
    5
    6
    7
    8
    Spring Cloud			 Spring Boot
    Angel版本 兼容Spring Boot 1.2.x
    Brixton版本 兼容Spring Boot 1.3.x,也兼容Spring Boot 1.4.x
    Camden版本 兼容Spring Boot 1.4.x,也兼容Spring Boot 1.5.x
    Dalston版本、Edgware版本 兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x
    Finchley版本 兼容Spring Boot 2.0.x,不兼容Spring Boot 1.5.x
    Greenwich版本 兼容Spring Boot 2.1.x
    Hoxtonl版本 兼容Spring Boot 2.2.x
  • 从 Spring Cloud 2020.0.0-M1 开始,Spring Cloud 废除了这种英国伦敦地铁站的命名方式,而使用了全新的 “日历化” 版本命名方式, 日历化版本不是基于任意的数字,而是基于项目的发布日期的版本控制约定,随着时间的推移,版本会越来越好。这种基于日期的版本命名方式被称为 “日历化版本”(Calendar Versioning), 或者可以简称 CalVer。

  • Spring Cloud 使用了 YYYY.MINOR.MICRO[-MODIFIER] 的命名规则:

    • YYYY:表示 4 位年份全称;
    • MINOR(辅助版本号):代表一个递增的数字,每年以 0 开始递增;
    • **MICRO(补丁版本号)**:代表版本号后缀,就和之前使用的 .0 类似于 .RELEASE 一样,.2 类似于 .SR2
    • MODIFIER:同上述修饰关键节点,BUILD-SNAPSHOT、里程碑M等。
  • 预发布版本的后缀分隔符也从 . 变更为 -,如:2020.0.0-M12020.0.0-RC2 命名所示。同时,Spring Cloud 将停止给快照版本添加 BUILD- 前缀,如:2020.0.0-SNAPSHOT 命名所示。

  • 但是,英国伦敦地铁站的命名没有彻底废除,Spring Cloud 将继续使用它作为版本代号,当前代号:Ilford,只是发布到 Maven 仓库的版本将不再使用这些名称。

Cloud与Boot对应关系

SpringCloud应该优先选择SR的版本 根据上面的原则首先选择SpringCloud要与SpringBoot版本能够对应的上 SpringCloud采用Hoxton.SR9, SpringBoot采用 2.3.5.RELEASE。

浏览器访问https://start.spring.io/actuator/info 在返回的数据中找到spring-cloud即可以查看SpringCloud与SpringBoot版本对应关系。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"spring-cloud": {
"Hoxton.SR12": "Spring Boot >=2.2.0.RELEASE and <2.4.0.M1",
"2020.0.6": "Spring Boot >=2.4.0.M1 and <2.6.0-M1",
"2021.0.0-M1": "Spring Boot >=2.6.0-M1 and <2.6.0-M3",
"2021.0.0-M3": "Spring Boot >=2.6.0-M3 and <2.6.0-RC1",
"2021.0.0-RC1": "Spring Boot >=2.6.0-RC1 and <2.6.1",
"2021.0.7": "Spring Boot >=2.6.1 and <3.0.0-M1",
"2022.0.0-M1": "Spring Boot >=3.0.0-M1 and <3.0.0-M2",
"2022.0.0-M2": "Spring Boot >=3.0.0-M2 and <3.0.0-M3",
"2022.0.0-M3": "Spring Boot >=3.0.0-M3 and <3.0.0-M4",
"2022.0.0-M4": "Spring Boot >=3.0.0-M4 and <3.0.0-M5",
"2022.0.0-M5": "Spring Boot >=3.0.0-M5 and <3.0.0-RC1",
"2022.0.0-RC1": "Spring Boot >=3.0.0-RC1 and <3.0.0-RC2",
"2022.0.0-RC2": "Spring Boot >=3.0.0-RC2 and <3.0.0",
"2022.0.2": "Spring Boot >=3.0.0 and <3.1.0-M1",
"2022.0.3-SNAPSHOT": "Spring Boot >=3.1.0-M1"
}