如果出现这个错误可能有两种情况:
1.那就是你的spring容器中确实注入了两个同名的对象,这个需要仔细检查自己的@Service、@Controller、@component是不是有相同的value值,或者xml文件中有两个一样的id
2.就是在maven环境下你的文件是从其他地方拷贝过来的,这时候需要clean一下然后重新启动,因为可能你的环境中存在了一份这样的文件。
相关文章
- springboot报错:Failed to parse configuration class XXX…non-compatible bean definition of same name XXX
- Spring报错 conflicts with existing, non-compatible bean definition of same name and class
- Annotation-specified bean name 。。。 conflicts with existing, non-compatible bean definition of same
- conflicts with existing, non-compatible bean definition of same name and class