1. 程式人生 > >Spring No qualifying bean of type錯誤

Spring No qualifying bean of type錯誤

No qualifying bean of type [xx.xxx.xxx.xxDao] dound for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency
沒找到bean,我的原因是web.xml裡沒有引入mybatis的xml配置檔案:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value
>classpath:spring-mybatis.xml</param-value> </context-param>