tomcat啟動報錯:注釋指定的bean類.與現有的沖突.相同的名稱和類


錯誤:

Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/business/config/web-application-config.xml]; nested exception is java.lang.IllegalStateException: Annotation-specified bean name 'com.chinauip.cfc.business.labre.lwpq.service.AddDataHandler' for bean class [com.chinauip.cfc.business.labre.lwpq.service.LwpqCancelHandler] conflicts with existing, non-compatible bean definition of same name and class [com.chinauip.cfc.business.labre.lwpq.service.AddDataHandler]

檢查bean類AddDataHandler發現沒什么問題

再檢查LwpqCancelHandler類發現神注解....copy的結果.

@Service("com.chinauip.cfc.business.labre.lwpq.service.AddDataHandler")
public class LwpqCancelHandler extends AbstractApplicationHandler {

...

}

修改:注解和類名一致.BUG解決. 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM