您的位置:首页 > 其它

关于ssm整合的豆知识<一>

2017-09-15 23:39 239 查看
在整合过程中如果遇到:
org.springframework.beans.factory.NoSuchBeanDefinitionException:
No matching bean of type [com.Dao.UserDao] 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)}
那么可以优先查看你的web.xml监听器是否被启动
我的监听器代码
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
添加上后问题解决
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: