• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

Cannot resolve reference to bean ‘cacheManager‘ while setting bean property ‘cacheManager‘

开发技术 开发技术 6天前 6次浏览

转:

Cannot resolve reference to bean ‘cacheManager‘ while setting bean property ‘cacheManager‘

项目场景:

今天在整合ssm框架,配置文件等写完后,在运行时出现问题。

问题描述:

运行时出现以下错误:
Cannot resolve reference to bean ‘cacheManager‘ while setting bean property ‘cacheManager‘

原因分析:

书写配置文件时,输入自动添加xmlns:mvc约束,添加约束错误!本来应该导入xmlns:mvc=”http://www.springframework.org/schema/mvc”的依赖,结果导入依赖错误。
Cannot resolve reference to bean ‘cacheManager‘ while setting bean property ‘cacheManager‘

解决方案:

约束导入错误,修改约束。将xmlns:cache=”http://www.springframework.org/schema/cache”或者xmlns:mvc=”http://www.springframework.org/schema/cache”改为xmlns:mvc=“http://www.springframework.org/schema/mvc”。也就是将cache改为mvc!问题成功解决。
Cannot resolve reference to bean ‘cacheManager‘ while setting bean property ‘cacheManager‘

转:

Cannot resolve reference to bean ‘cacheManager‘ while setting bean property ‘cacheManager‘


喜欢 (0)