Annotation-specified bean name ‘brdbService‘ for bean class

简介: Annotation-specified bean name ‘brdbService‘ for bean class

启动报错,

Annotation-specified bean name 'brdbService' for bean class [com.test.service.brdbService] conflicts with existing

分析原因: 出现这个错误主要是你的spring里面的bean名字重复了。

解决方法:

(1)如果只需要扫描impl指定目录下的包,不扫其他重复bean所在包可解决问题 spring中配置  也能解决问题。

(2)去掉相同的bean名称,解决根本问题

目录
打赏
0
0
0
0
224
分享
相关文章
|
10月前
|
ServiceLocatorFactoryBean获取Bean方法
在上述示例中,`MyService`是要获取的具体Bean的类型。通过配置 `ServiceLocatorFactoryBean`,定义 `ServiceLocator`接口和实现类,然后通过获取 `MyServiceLocator`实例并调用方法,可以从Spring容器中获取特定类型的Bean。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
109 0
配置bean的4种情况
只有聪明人才能看见的摘要~( ̄▽ ̄~)~
93 2
|
10月前
|
ClassPathXmlApplicationContex和ApplicationContext和BeanFactory的区别和联系
ClassPathXmlApplicationContex和ApplicationContext和BeanFactory的区别和联系
104 2
获取类中所有的bean
获取类中所有的bean
62 0
Spring - 属性注入之注解(@Autowired、@Qualifier、@Resource)
Spring - 属性注入之注解(@Autowired、@Qualifier、@Resource)
275 0
Spring - 属性注入之注解(@Autowired、@Qualifier、@Resource)

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等