解决org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined

在Spring配置文件中加入了支持注解,即<mvc:annotation-driven/>

重新启动服务器包 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cacheManager' is defined错误

错误原因:命名空间选择的是xmlns:mvc="http://www.springframework.org/schema/cache"

解决方法:换一种命名空间,即xmlns:mvc="http://www.springframework.org/schema/tx"

重新启动成功了


posted @ 2017-05-16 21:54  何甜甜在吗  阅读(2080)  评论(0编辑  收藏  举报