首页 > 代码库 > 【spring】non-compatible bean definition of same name and class

【spring】non-compatible bean definition of same name and class

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [F:\java6\idear2010\idear2010\WEB-INF\classes\applicationContext.xml]; nested exception is java.lang.IllegalStateException:Annotation-specified bean name ‘homeAction‘ for bean class [com.idearsoft.idear.module.SystemMaintain.action.HomeAction] conflicts with existing, non-compatiblebean definition of same name and class [com.idearsoft.idear.module.Main.action.HomeAction]

我在连个个不同package中有两个相同名称的类,只是类所在的目录不同。例如在 com.idearsoft.idear.module.SystemMaintain.action下有个HomeAction.java,在 com.idearsoft.idear.module.Main.action也有一个HomeAction.java。在应用服务器启动时总是提示这两个homeAction 冲突。

 

自:http://blog.sina.com.cn/s/blog_4b6f8d1501015jt4.html


 

 

【spring】non-compatible bean definition of same name and class