BeanCreationException: Error creating bean with name ‘configurationPropertiesBeans‘ defined in class

﹏ヽ暗。殇╰゛Y 2024-03-03 08:07 210阅读 0赞

1 现象

启动 SpringCloud项目时报错。

2 解决方案

2.1 spring-cloud-dependencies添加到dependencyManagement标签

  1. <dependencyManagement>
  2. <dependencies>
  3. <!--整合spring cloud-->
  4. <dependency>
  5. <groupId>org.springframework.cloud</groupId>
  6. <artifactId>spring-cloud-dependencies</artifactId>
  7. <version>Greenwich.SR1</version>
  8. <type>pom</type>
  9. <scope>import</scope>
  10. </dependency>

如若还不行,看第二步:

2.2 协作的 SpringBoot 版本

如果你是将spring cloud依赖引入SpringBoot项目,就需要spring boot版本和spring cloud版本应严格按照官方版本匹配。
官方网站链接:spring-cloud

91b375bdde604450b813dc25a8dd7401.png
笔者就是因为将低版本 sc 引入了高版本 sb 导致报错,升级 sc 版本即可。
参考:

  • https://stackoverflow.com/questions/69061913/beancreationexception-error-creating-bean-with-name-configurationpropertiesbea

发表评论

表情:
评论列表 (有 0 条评论,210人围观)

还没有评论,来说两句吧...

相关阅读