前言:SpringCloud是微服务架构的一揽子解决方案,SpringBoot是一种技术,要使用SpringCloud,也需要使用到SpringBoot,所以要使用SpringCloud时,必须也要考虑到SpringBoot的适配问题
1、查看SpringCloud和与之对应的SpringBoot版本
进入SpringCloud的官网,往下滑可以看到一个SpringCloud和SpringBoot对应的表,根据这个表我们可以得知SpringCloud和SpringBoot互相匹配的版本
2、查看更详细的SpringCloud和与之对应的SpringBoot版本
在浏览器输入以下链接
https://start.spring.io/actuator/info
效果图:
格式化后的json:
{
"git": {
"branch": "f39256667f40e59c6584809d58ab16a9e9810a0a",
"commit": {
"id": "f392566",
"time": "2023-07-08T10:06:27Z"
}
},
"build": {
"version": "0.0.1-SNAPSHOT",
"artifact": "start-site",
"versions": {
"spring-boot": "3.1.1",
"initializr": "0.20.0-SNAPSHOT"
},
"name": "start.spring.io website",
"time": "2023-07-08T10:13:51.812Z",
"group": "io.spring.start"
},
"bom-ranges": {
"codecentric-spring-boot-admin": {
"2.4.3": "Spring Boot >=2.3.0.M1 and <2.5.0-M1",
"2.5.6": "Spring Boot >=2.5.0.M1 and <2.6.0-M1",
"2.6.8": "Spring Boot >=2.6.0.M1 and <2.7.0-M1",
"2.7.4": "Spring Boot >=2.7.0.M1 and <3.0.0-M1",
"3.0.4": "Spring Boot >=3.0.0-M1 and <3.1.0-M1",
"3.1.1": "Spring Boot >=3.1.0-M1 and <3.2.0-M1"
},
"hilla": {
"2.1.1": "Spring Boot >=3.1.0-M1 and <3.2.0-M1"
},
"solace-spring-boot": {
"1.1.0": "Spring Boot >=2.3.0.M1 and <2.6.0-M1",
"1.2.2": "Spring Boot >=2.6.0.M1 and <3.0.0-M1",
"2.0.0": "Spring Boot >=3.0.0-M1"
},
"solace-spring-cloud": {
"1.1.1": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"2.1.0": "Spring Boot >=2.4.0.M1 and <2.6.0-M1",
"2.3.2": "Spring Boot >=2.6.0.M1 and <3.0.0-M1",
"3.0.0": "Spring Boot >=3.0.0-M1"
},
"spring-cloud": {
"Hoxton.SR12": "Spring Boot >=2.2.0.RELEASE and <2.4.0.RELEASE",
"2020.0.6": "Spring Boot >=2.4.0.RELEASE and <2.6.0",
"2021.0.8": "Spring Boot >=2.6.0 and <3.0.0",
"2022.0.3": "Spring Boot >=3.0.0 and <3.2.0-M1"
},
"spring-cloud-azure": {
"4.9.0": "Spring Boot >=2.5.0.M1 and <3.0.0-M1",
"5.3.0": "Spring Boot >=3.0.0-M1 and <3.2.0-M1"
},
"spring-cloud-gcp": {
"2.0.11": "Spring Boot >=2.4.0-M1 and <2.6.0-M1",
"3.5.4": "Spring Boot >=2.6.0-M1 and <3.0.0-M1",
"4.5.1": "Spring Boot >=3.0.0-M1 and <3.2.0-M1"
},
"spring-cloud-services": {
"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",
"3.3.0": "Spring Boot >=2.5.0-M1 and <2.6.0-M1",
"3.4.0": "Spring Boot >=2.6.0-M1 and <2.7.0-M1",
"3.5.0": "Spring Boot >=2.7.0-M1 and <3.0.0-M1",
"4.0.0": "Spring Boot >=3.0.0 and <3.1.0-M1"
},
"spring-shell": {
"2.1.11": "Spring Boot >=2.7.0 and <3.0.0-M1",
"3.0.6": "Spring Boot >=3.0.0 and <3.1.0-M1",
"3.1.2": "Spring Boot >=3.1.0 and <3.2.0-M1"
},
"vaadin": {
"14.10.3": "Spring Boot >=2.1.0.RELEASE and <2.6.0-M1",
"23.2.15": "Spring Boot >=2.6.0-M1 and <2.7.0-M1",
"23.3.16": "Spring Boot >=2.7.0-M1 and <3.0.0-M1",
"24.0.9": "Spring Boot >=3.0.0-M1 and <3.1.0-M1",
"24.1.2": "Spring Boot >=3.1.0-M1 and <3.2.0-M1"
},
"wavefront": {
"2.0.2": "Spring Boot >=2.1.0.RELEASE and <2.4.0-M1",
"2.1.1": "Spring Boot >=2.4.0-M1 and <2.5.0-M1",
"2.2.2": "Spring Boot >=2.5.0-M1 and <2.7.0-M1",
"2.3.4": "Spring Boot >=2.7.0-M1 and <3.0.0-M1",
"3.0.1": "Spring Boot >=3.0.0-M1 and <3.1.0-M1"
}
},
"dependency-ranges": {
"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",
"2.1.6": "Spring Boot >=2.5.0-M1 and <3.0.0-M1",
"3.0.4": "Spring Boot >=3.0.0-M1 and <3.2.0-M1"
},
"mybatis": {
"2.1.4": "Spring Boot >=2.1.0.RELEASE and <2.5.0-M1",
"2.2.2": "Spring Boot >=2.5.0-M1 and <2.7.0-M1",
"2.3.1": "Spring Boot >=2.7.0-M1 and <3.0.0-M1",
"3.0.2": "Spring Boot >=3.0.0-M1"
},
"pulsar": {
"0.2.0": "Spring Boot >=3.0.0 and <3.1.0-M1"
},
"pulsar-reactive": {
"0.2.0": "Spring Boot >=3.0.0 and <3.1.0-M1"
},
"camel": {
"3.5.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"3.10.0": "Spring Boot >=2.4.0.M1 and <2.5.0-M1",
"3.13.0": "Spring Boot >=2.5.0.M1 and <2.6.0-M1",
"3.17.0": "Spring Boot >=2.6.0.M1 and <2.7.0-M1",
"3.20.6": "Spring Boot >=2.7.0.M1 and <3.0.0-M1",
"4.0.0-RC1": "Spring Boot >=3.0.0-M1 and <3.2.0-M1"
},
"picocli": {
"4.7.0": "Spring Boot >=2.5.0.RELEASE and <3.1.0-M1"
},
"open-service-broker": {
"3.2.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"3.3.1": "Spring Boot >=2.4.0-M1 and <2.5.0-M1",
"3.4.1": "Spring Boot >=2.5.0-M1 and <2.6.0-M1",
"3.5.0": "Spring Boot >=2.6.0-M1 and <2.7.0-M1"
}
}
}
找到spring-cloud即可查看到更详细的SpringCloud和与之对应的SpringBoot版本
3、查看更更详细的SpringCloud和与之对应的SpringBoot版本
(1)进入以下网址,即可看到各个SpringCloud的版本,其中CUrRENt表示是当前最新版、SNAPSHOT表示是相对稳定版本,但是会再进行改进,最好不要用于生产环境、GA表示是发行稳定版,官方推荐使用此版本,点击相应版本后面的Referenece Doc,即可看到官方推荐的与相应SpringCloud版本相对应的SpringBoot版本
https://spring.io/projects/spring-cloud#learn
(2)由图可知官方推荐SpringCloud2022.0.3使用的SpringBoot版本为3.0.7,SpringCloud2022.0.3和SpringBoot3.0.7最适配
4、查看详细的SpringCloud Alibaba和与之对应的SpringBoot版本
进入介绍SpringCloud Alibaba的github网址,可以查看到众多对应的SpringClou Alibaba和和与之对应的SpringBoot版本
https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E