原文:conflicts with existing, non-compatible bean definition of same name and class

Annotation specified bean name xxxxxImpl for bean class cn.abc.dao.service.xxxxxImpl conflicts with existing, non compatible bean definition of same name and class cn.abc.dao.service.dev.xxxxxIImpl 編譯 ...

2019-07-25 17:10 0 1147 推薦指數:

查看詳情

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
because of an existing model object of the same name

背景:   視圖解析器(我們用的是velocity) 報錯:   because of an existing model object of the same name 按照網上給的原因 : 設置了屬性exposeSessionAttributes為true之后,所有的session ...

Thu Sep 20 00:51:00 CST 2018 0 865
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM