w
wish611
V1
2023/05/25阅读:12主题:橙心
Spring Cloud组件版本管理
最近搞spring cloud工程的时候,配置加入spring cloud alibaba相关组件时,启动出现
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
这个错误,后经查询发现是由于 Spring boot和Spring cloud alibaba组件之间版本不适配导致。
1.可参考Spring cloud alibaba说明文档:
Spring boot、Spring cloud 以及 Spring cloud alibaba各组件之间版本关系: https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E#%E7%BB%84%E4%BB%B6%E7%89%88%E6%9C%AC%E5%85%B3%E7%B3%BB
如果想用脚手架生成工程,可使用 https://start.aliyun.com/ 进行相关配置选项,然后下载下来进行修改即可
2.spring官网查询
最后还有个网站可以查询spring cloud中各组件的版本对应关系 https://start.spring.io/actuator/info ,根据返回的json可以查看:
{
"git":{
"branch":"8e0742cb74ba4be896a27aec319af460b7e99db5",
"commit":{
"id":"8e0742c",
"time":"2023-05-24T11:16:56Z"
}
},
"build":{
"version":"0.0.1-SNAPSHOT",
"artifact":"start-site",
"versions":{
"spring-boot":"3.1.0",
"initializr":"0.20.0-SNAPSHOT"
},
"name":"start.spring.io website",
"time":"2023-05-24T11:47:51.204Z",
"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"
},
"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.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"
},
"spring-cloud-azure":{
"4.7.0":"Spring Boot >=2.5.0.M1 and <3.0.0-M1",
"5.1.0":"Spring Boot >=3.0.0-M1 and <3.1.0-M1"
},
"spring-cloud-gcp":{
"2.0.11":"Spring Boot >=2.4.0-M1 and <2.6.0-M1",
"3.5.1":"Spring Boot >=2.6.0-M1 and <3.0.0-M1",
"4.3.1":"Spring Boot >=3.0.0-M1 and <3.1.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.9":"Spring Boot >=2.7.0 and <3.0.0-M1",
"3.0.3":"Spring Boot >=3.0.0 and <3.1.0-M1"
},
"vaadin":{
"14.9.6":"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.11":"Spring Boot >=2.7.0-M1 and <3.0.0-M1",
"24.0.5":"Spring Boot >=3.0.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.3":"Spring Boot >=3.0.0-M1 and <3.1.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.4":"Spring Boot >=2.7.0.M1 and <3.0.0-M1",
"4.0.0-M3":"Spring Boot >=3.0.0-M1 and <3.1.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"
}
}
}
作者介绍
w
wish611
V1