Annotation-specified bean name 'userDaoImpl' for bean class [***] conflicts with existing, n

Posted arebirth

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Annotation-specified bean name 'userDaoImpl' for bean class [***] conflicts with existing, n相关的知识,希望对你有一定的参考价值。

使用Spring开发的时候报错如下:

Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name userDaoImpl for bean class [cn.arebirth.impl.UserDaoImpl] conflicts with existing, non-compatible bean definition of same name and class [cn.arebirth.dao.impl.UserDaoImpl]

 

排错思想:

  Spring Bean管理的对象名称相同了,也就是说有两个类的名字相同。

以上是关于Annotation-specified bean name 'userDaoImpl' for bean class [***] conflicts with existing, n的主要内容,如果未能解决你的问题,请参考以下文章