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