SpringBoot启动报错
背景:
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]
原因:
父项目中引入得springboot版本是2.5.6,而引入的springcloud alibaba版本是2.2.0.RELEASE,版本不匹配
解决:
根据版本依赖关系,将springboot版本降到了2.2.1.RELEASE,启动正常!!
修改后: