实际工作中,如果二者版本对应不上,会出现各种各样的兼容性的问题,Spring Cloud版本代号使用的是英文标识,是英国London的地铁站名,因为一个版本包含的组件模块太多了,版本不一,不能统一的用类似Spring Boot数字版本号来表示。
一、 官方文档查看
在官网的Spring Cloud版本Hoxton SR7的Reference Doc中的内容如下,指定支持的boot版本为2.3.2.RELEASE:
Release Train Version: Hoxton.SR7
Supported Boot Version: 2.3.2.RELEASE
根据此官方文档得知该cloud版本兼容的boot版本只有一个,boot无法进行小范围的版本的调整。
二、 更优的查看方式
springCloud官方提供最准确的springCloud,springBoot版本对应关系,可通过如下网址查看:
https://start.spring.io/actuator/info
该网址,访问的内容是json,格式化后内容如下:
{
"git": {
"branch": "72506972926758dc1808eaa450281274ee85459a",
"commit": {
"id": "7250697",
"time": "2020-08-17T15:37:11Z"
}
},
"build": {
"version": "0.0.1-SNAPSHOT",
"artifact": "start-site",
"versions": {
"spring-boot": "2.3.3.RELEASE",
"initializr": "0.9.2-SNAPSHOT"
},
"name": "start.spring.io website",
"time": "2020-08-17T15:38:19.523Z",
"group": "io.spring.start"
},
"bom-ranges": {
"azure": {
"2.0.10": "Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
"2.1.10": "Spring Boot >=2.1.0.RELEASE and <2.2.0.M1",
"2.2.4": "Spring Boot >=2.2.0.M1 and <2.3.0.M1",
"2.3.1": "Spring Boot >=2.3.0.M1"
},
"codecentric-spring-boot-admin": {
"2.0.6": "Spring Boot >=2.0.0.M1 and <2.1.0.M1",
"2.1.6": "Spring Boot >=2.1.0.M1 and <2.2.0.M1",
"2.2.4": "Spring Boot >=2.2.0.M1 and <2.3.0.M1",
"2.3.0": "Spring Boot >=2.3.0.M1 and <2.4.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"
},
"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"
},
"spring-cloud": {
"Finchley.M2": "Spring Boot >=2.0.0.M3 and <2.0.0.M5",
"Finchley.M3": "Spring Boot >=2.0.0.M5 and <=2.0.0.M5",
"Finchley.M4": "Spring Boot >=2.0.0.M6 and <=2.0.0.M6",
"Finchley.M5": "Spring Boot >=2.0.0.M7 and <=2.0.0.M7",
"Finchley.M6": "Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
"Finchley.M7": "Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
"Finchley.M9": "Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE",
"Finchley.RC1": "Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE",
"Finchley.RC2": "Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE",
"Finchley.SR4": "Spring Boot >=2.0.3.RELEASE and <2.0.999.BUILD-SNAPSHOT",
"Finchley.BUILD-SNAPSHOT": "Spring Boot >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3",
"Greenwich.M1": "Spring Boot >=2.1.0.M3 and <2.1.0.RELEASE",
"Greenwich.SR6": "Spring Boot >=2.1.0.RELEASE and <2.1.17.BUILD-SNAPSHOT",
"Greenwich.BUILD-SNAPSHOT": "Spring Boot >=2.1.17.BUILD-SNAPSHOT and <2.2.0.M4",
"Hoxton.SR7": "Spring Boot >=2.2.0.M4 and <2.3.4.BUILD-SNAPSHOT",
"Hoxton.BUILD-SNAPSHOT": "Spring Boot >=2.3.4.BUILD-SNAPSHOT and <2.4.0.M1",
"2020.0.0-SNAPSHOT": "Spring Boot >=2.4.0.M1"
},
"spring-cloud-alibaba": {
"2.2.1.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"
},
"spring-cloud-services": {
"2.0.3.RELEASE": "Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
"2.1.7.RELEASE": "Spring Boot >=2.1.0.RELEASE and <2.2.0.RELEASE",
"2.2.3.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"
},
"spring-statemachine": {
"2.0.0.M4": "Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
"2.0.0.M5": "Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
"2.0.1.RELEASE": "Spring Boot >=2.0.0.RELEASE"
},
"vaadin": {
"10.0.17": "Spring Boot >=2.0.0.M1 and <2.1.0.M1",
"14.3.3": "Spring Boot >=2.1.0.M1 and <2.4.0-M1"
},
"wavefront": {
"2.0.0": "Spring Boot >=2.1.0.RELEASE"
}
},
"dependency-ranges": {
"okta": {
"1.2.1": "Spring Boot >=2.1.2.RELEASE and <2.2.0.M1",
"1.4.0": "Spring Boot >=2.2.0.M1 and <2.4.0-M1"
},
"mybatis": {
"2.0.1": "Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
"2.1.3": "Spring Boot >=2.1.0.RELEASE and <2.4.0-M1"
},
"geode": {
"1.2.9.RELEASE": "Spring Boot >=2.2.0.M5 and <2.3.0.M1",
"1.3.2.RELEASE": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
"1.4.0-M1": "Spring Boot >=2.4.0-M1"
},
"camel": {
"2.22.4": "Spring Boot >=2.0.0.M1 and <2.1.0.M1",
"2.25.2": "Spring Boot >=2.1.0.M1 and <2.2.0.M1",
"3.3.0": "Spring Boot >=2.2.0.M1 and <2.3.0.M1",
"3.4.3": "Spring Boot >=2.3.0.M1 and <2.4.0-M1"
},
"open-service-broker": {
"2.1.3.RELEASE": "Spring Boot >=2.0.0.RELEASE and <2.1.0.M1",
"3.0.4.RELEASE": "Spring Boot >=2.1.0.M1 and <2.2.0.M1",
"3.1.1.RELEASE": "Spring Boot >=2.2.0.M1 and <2.4.0-M1"
}
}
}
根据以下依据:
"Hoxton.SR7": "Spring Boot >=2.2.0.M4 and <2.3.4.BUILD-SNAPSHOT"
可知,springCloud的Hoxton.SR7
版本对应spring Boot的版本范围是Spring Boot >=2.2.0.M4 and <2.3.4.BUILD-SNAPSHOT
。
此网站返回内容,除了包含springCloud和springBoot的版本对应关系,还有其他组件和springBoot之间的版本对应关系,如下为mybatis和springBoot的兼容版本:
"mybatis": {
"2.0.1": "Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
"2.1.3": "Spring Boot >=2.1.0.RELEASE and <2.4.0-M1"
}
网友评论