java 項目啓動報錯:No qualifying bean of type 'com.service.ABCDService' available: expected at least 1 bea

java 項目啓動報錯:No qualifying bean of type 'com.service.ABCDService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=,  。。。

原因是:沒有給對應要注入 bean 的實現類加註解,如dao層,要加 @Repository; service層,要加 @Service

 

轉載自: https://blog.csdn.net/tangruyi1992/article/details/51991889

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章