No qualifying bean of type '***' available: expected at least 1 bean which qualifies as auto

Posted thinkingandworkinghard

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No qualifying bean of type '***' available: expected at least 1 bean which qualifies as auto相关的知识,希望对你有一定的参考价值。

    搭建spring mvc项目的dao层之后,经常出现这样的错误。一般是由于spring 扫描时候 没有配置具体的目录,或者配置了但是包名不对造成的。但是今天自己出这个问题,找了半天没找到哪里出问题。 最后仔细看配置文件,发现是自己的applicationContext-springmvc.xml一处配置和自己的resources名称不对造成的

技术图片

 

 把resource改成 resources 就好了。。。

以上是关于No qualifying bean of type '***' available: expected at least 1 bean which qualifies as auto的主要内容,如果未能解决你的问题,请参考以下文章

No qualifying bean of type报错问题处理

No qualifying bean of type '***' available: expected at least 1 bean which qualifies as auto

No qualifying bean of type ‘com.bruceliu.mapper.UserMapper‘

spring注入时报错::No qualifying bean of type 'xxx.xxMapper'

No qualifying bean of type ‘com.kkb.dao.*Mapper‘ available

No qualifying bean of type ‘com.kkb.dao.*Mapper‘ available