原文:SpringMVC conflicts with existing, non-compatible bean definition of same name and class 的解決辦法

問題起因 最近,項目組的里的同事遇到一個問題,他自己負責的模塊,SpringMVC的Controller與其他模塊的Controller 類名重名了,導致整個工程都起不來了。 后台報的錯誤是這樣的: Controller for bean class ontroller conflicts with existing, non compatible bean definition of same ...

2015-05-27 19:15 3 57595 推薦指數:

查看詳情

bean名稱相同沖突Annotation-specified bean name 'xx' for bean class [xxx] conflicts with existing, non-compatible bean definition of same name and class[xxx]

工程中引入其他工程的包,由於兩個工程中有重名的兩個bean,導致在啟動時提示如下錯誤: 根據bean名稱在ide中查找,找到這兩個重名的類,可以看到由於這兩個類使用@Service標注,此時如果不使用命名,那么Spring會在掃描時,將類名首字母小寫作為key,放到一個全局Map中維護。此時 ...

Fri Oct 11 23:40:00 CST 2019 0 5366
non-compatible bean definition of same name and class

在整合struts2.1.6+spring2.5.6開發中,使用了注解和struts-convention來實現零配置管理。spring也使用注解annotation方式。現在的問題是:我在連個個不同 ...

Tue Mar 21 23:16:00 CST 2017 0 10601
異常解決non-compatible bean definition of same name and class【com.xxx.xxx.XXX】

昨天同事遇到這樣一個問題,意思是spring找到 有相同的實現類名在不同的package目錄下。 跟蹤他的項目代碼並未發現問題。 重新給他的maven項目進行maven install一下。 查看打好的war包,發現里面確實存在相同的實現類名的class文件。 原因:他之前 ...

Wed Jul 03 00:16:00 CST 2019 0 600
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM