Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.icbca.core.dao.TestTbDAO] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
我的代码:

原因:
对TestTbDao 接口包名修改后导致的。
(1)接口 TestTbDao 和其配置文件名不一样时候导致了 该错误
(2)修改了报名后 忘记了修改 mapper.xml文件中接口的路径。

(3)没有修改mapper配置文件。
博客指出代码报错原因是对TestTbDao接口包名修改后导致的。具体包括接口和配置文件名不同、修改包名后忘记修改mapper.xml文件中接口路径,以及未修改mapper配置文件。
207

被折叠的 条评论
为什么被折叠?



