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

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

1 现象

启动 SpringCloud项目时报错。

2 解决方案

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

<dependencyManagement>
    <dependencies>
        <!--整合spring cloud-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Greenwich.SR1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

如若还不行,看第二步:

2.2 协作的 SpringBoot 版本

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

官方网站链接:spring-cloud

笔者就是因为将低版本 sc 引入了高版本 sb 导致报错,升级 sc 版本即可。

参考:


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


目录
相关文章
|
2月前
|
Java 数据库
JPA IllegalArgumentException occurred while calling setter for property问题件解决
JPA IllegalArgumentException occurred while calling setter for property问题件解决
|
3月前
Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed while singletons
Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed while singletons
94 3
|
Java 数据库连接 Redis
Bean method ‘redisConnectionFactory‘ not loaded because @ConditionalOnClass did not find required c
Bean method ‘redisConnectionFactory‘ not loaded because @ConditionalOnClass did not find required c
99 0
|
Java
ApplicationContext is unlikely to start due to a @ComponentScan of the default package
解决办法: 1、一般发出这个警告的原因是你把启动类直接放在的src目录下面。 2、你需要在src目录下面再建一个包,然后把启动类放到下面。 3、或者你错将启动类放到java文件中了,与项目包成了同级文件,你只需要将启动类放到项目包里就可以。
88 0
|
Java Apache Spring
解决required a single bean, but 2 were found问题
背景:springboot整合shiro中自定义Realm时出现 错误描述 Parameter 0 of method getDefaultWebSecurityManager in cn.ken.springboot_shiro.config.ShiroConfig required a single bean, but 2 were foun
|
消息中间件 Java RocketMQ
【Java】Error creating bean with name ‘functionBindingRegistrar‘ defined in class path resource的一种解决方式
【Java】Error creating bean with name ‘functionBindingRegistrar‘ defined in class path resource的一种解决方式
138 0
Error creating bean with name ‘userServiceImpl‘: Unsatisfied dependency expressed through field ‘bas
Error creating bean with name ‘userServiceImpl‘: Unsatisfied dependency expressed through field ‘bas
406 0
|
druid
A bean with that name has already been defined in class path resource and overriding is disabled.
A bean with that name has already been defined in class path resource and overriding is disabled.
215 0
|
Java 数据库连接 网络安全
Error creating bean with name ‘attrAttrgroupRelationController‘
Error creating bean with name ‘attrAttrgroupRelationController‘
Error creating bean with name ‘attrAttrgroupRelationController‘
|
Nacos
Nacos报错:Error creating bean with name ‘authFilterRegistration‘ defined in class path resource
Nacos报错:Error creating bean with name ‘authFilterRegistration‘ defined in class path resource
481 0