我们在学习一套框架时,对框架的版本选择尤为重要,尤其是在许多框架组件需要组合的情况下,如果出现某个组件版本不兼容,那可能是灾难性的,因此,我们需要在正式学习SpringCloud前,做好相关版本选择。
[v_blue]提示:可直接拉到文章最后看定稿版本[/v_blue]
1、版本总览:
由于我们主要用到SpringBoot、Spring Cloud以及Spring Cloud Alibaba我们访问如下王者查看他们的对应关系:点击查看版本对应关系
(截至2021.3.22如图:)

2、Spring Cloud版本
我们先打开Spring Cloud官网:点此查看官网

我们选择H版,也是目前市场上目前比较流行的版本,更具体的我们可以点进去,目前已经更新到了Hoxton.SR10,但我们选择Hoxton.SR8版本,其中更多组件版本如图:

[v_blue]提示:
SpringBoot的版本号是通过数字来命名的,SpringCloud则是通过希腊英文字母的方式,在发布的版本时是以伦敦地铁站作为版本命名,并按地铁站名称的首字母A-Z依次命名。[/v_blue]

程序员导航
优网导航旗下整合全网优质开发资源,一站式IT编程学习与工具大全网站
3、SpringBoot版本
我们先打开SpringBoot官网:点此查看官网我们发现SpringBoot已经更新到了2.4.4了,但我们选择了2.3.2.RELEASE版本
4、版本对应关系查询小技巧
版本对应关系查询另外一个小技巧就是访问如下网址:版本对应关系查询,会返回一串json,我们复制,找个json格式化网站去格式化后,发现目前的版本对应关系如下:
{
"git": {
"branch": "100993521962b2a36eebcca56205ca0345bfecf5",
"commit": {
"id": "1009935",
"time": "2021-03-19T13:15:52Z"
}
},
"build": {
"version": "0.0.1-SNAPSHOT",
"artifact": "start-site",
"versions": {
"spring-boot": "2.4.4",
"initializr": "0.11.0-SNAPSHOT"
},
"name": "start.spring.io website",
"time": "2021-03-19T13:18:08.098Z",
"group": "io.spring.start"
},
"bom-ranges": {
"azure": {
"2.2.4": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
"3.2.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1"
},
"codecentric-spring-boot-admin": {
"2.2.4": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
"2.3.1": "Spring Boot >=2.3.0.M1 and <2.5.0-M1"
},
"solace-spring-boot": {
"1.0.0": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
"1.1.0": "Spring Boot >=2.3.0.M1 and <2.5.0-M1"
},
"solace-spring-cloud": {
"1.0.0": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
"1.1.1": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"2.0.0": "Spring Boot >=2.4.0.M1 and <2.5.0-M1"
},
"spring-cloud": {
"Hoxton.SR10": "Spring Boot >=2.2.0.RELEASE and <2.3.10.BUILD-SNAPSHOT",
"Hoxton.BUILD-SNAPSHOT": "Spring Boot >=2.3.10.BUILD-SNAPSHOT and <2.4.0.M1",
"2020.0.0-M3": "Spring Boot >=2.4.0.M1 and <=2.4.0.M1",
"2020.0.0-M4": "Spring Boot >=2.4.0.M2 and <=2.4.0-M3",
"2020.0.0": "Spring Boot >=2.4.0.M4 and <=2.4.0",
"2020.0.2": "Spring Boot >=2.4.1 and <2.5.0-M1",
"2020.0.3-SNAPSHOT": "Spring Boot >=2.4.5-SNAPSHOT"
},
"spring-cloud-alibaba": {
"2.2.1.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"
},
"spring-cloud-gcp": {
"2.0.0": "Spring Boot >=2.4.0-M1 and <2.5.0-M1"
},
"spring-cloud-services": {
"2.2.6.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.RELEASE",
"2.3.0.RELEASE": "Spring Boot >=2.3.0.RELEASE and <2.4.0-M1",
"2.4.1": "Spring Boot >=2.4.0-M1 and <2.5.0-M1"
},
"spring-geode": {
"1.2.12.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
"1.3.9.RELEASE": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"1.4.3": "Spring Boot >=2.4.0-M1 and <2.5.0-M1",
"1.5.0-M2": "Spring Boot >=2.5.0-M1"
},
"vaadin": {
"14.4.10": "Spring Boot >=2.1.0.RELEASE and <2.5.0-M1"
},
"wavefront": {
"2.0.2": "Spring Boot >=2.1.0.RELEASE and <2.4.0-M1",
"2.1.0": "Spring Boot >=2.4.0-M1"
}
},
"dependency-ranges": {
"native": {
"0.9.0": "Spring Boot >=2.4.3 and <2.4.4-SNAPSHOT",
"0.9.1-SNAPSHOT": "Spring Boot >=2.4.4-SNAPSHOT and <2.5.0-M1"
},
"okta": {
"1.4.0": "Spring Boot >=2.2.0.RELEASE and <2.4.0-M1",
"1.5.1": "Spring Boot >=2.4.0-M1 and <2.4.1",
"2.0.1": "Spring Boot >=2.4.1 and <2.5.0-M1"
},
"mybatis": {
"2.1.4": "Spring Boot >=2.1.0.RELEASE and <2.5.0-M1"
},
"camel": {
"3.3.0": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
"3.5.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"3.8.0": "Spring Boot >=2.4.0.M1 and <2.5.0-M1"
},
"open-service-broker": {
"3.1.1.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
"3.2.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"3.3.0": "Spring Boot >=2.4.0-M1 and <2.5.0-M1"
}
}
}
5、最终版本定稿
| 框架/工具 | 版本 |
| Spring Boot | 2.3.2.RELEASE |
| Spring Cloud | Hoxton.SR8 |
| Spring Cloud Alibaba | 2.2.5.RELEASE |
| JDK | 1.8 |
| Maven | 3.5及以上 |
| Mysql | mysql 8 |
| Intellij IDEA | 2019.2 |
附:常用组件父项目pom依赖如下:
org.springframework.boot spring-boot-dependencies 2.3.2.RELEASE pom import org.springframework.cloud spring-cloud-dependencies Hoxton.SR8 pom import com.alibaba.cloud spring-cloud-alibaba-dependencies 2.2.5.RELEASE pom import
[v_warn]注意:该配置置于dependencyManagement的dependencies中,约定统一版本,让子项目继承[/v_warn]
如果你没有IDEA可参考:
[neilian ids=644]
如果你不会整合Maven请参考:
[neilian ids=740]
如果你不是mysql8可参考:
[neilian ids=415]
[v_warn]注意:务必需要和潘老师的版本保持一致(IDEA除外),否则可能会出现意料之外的错误哦~[/v_warn]
[v_act]附:组件停更说明:[/v_act]


AI 工具导航
优网导航旗下AI工具导航,精选全球千款优质 AI 工具集



