conflicts with existing, non-compatible bean definition of same name and class after proguard obfuscation

本秂侑毒 提交于 2019-12-04 17:24:17

I'm not sure if this is what you want, but you can specify bean name in @Component (and stereotypes @Repository, @Service and @Controller) value:

@Component("myBeanName")
public class MyBean {

}

Another cause; you may have different versions of Spring in your classpath, for example, spring 2.x with spring 3.x. In such condition, beans seem to be loaded twice. If you use maven, check if a module does not import an old version of Spring (mvn dependency:tree) and remove it by excluding the involved spring artifact (exclusions).

I had the same problem and nothing else was helping out. Sometimes the problem occurs if you have moved your classes around and it refers to old classes, even if they don't exist.

In this case, just do this :

mvn eclipse:clean

mvn eclipse:eclipse

This worked well for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!