zoukankan      html  css  js  c++  java
  • Cannot resolve reference to bean 'cacheManager' while setting bean property 'cacheManager'异常解决方案

    解决方案:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:context="http://www.springframework.org/schema/context"
           xmlns:mvc="http://www.springframework.org/schema/mvc"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context.xsd
           http://www.springframework.org/schema/mvc
           http://www.springframework.org/schema/mvc/spring-mvc.xsd">

    错误原因1:

    http://www.springframework.org/schema/mvc/spring-mvc.xsd这个
    之前IDEA在spring-mvc后面自动加了版本号(好像是3.1.2),删了就可以了

     错误原因2:

      有关mvc的包选择错了,当时IDEA自动导入了

    http://www.springframework.org/schema/cache
    http://www.springframework.org/schema/cache/spring-cache.xsd

    把这两个换成
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc.xsd

    就可以了

    Error creating bean with name 'org.springframework.cache.interceptor.CacheInterceptor#0’


    spring配置文件添加注解扫描<mvc:annotation-driven />之后,idea会自动给你添加引用,但是它添加的引用是xmlns:mvc=”http://www.springframework.org/schema/cache”,这就导致了问题。应该把它改成xmlns:mvc=”http://www.springframework.org/schema/mvc”

     
  • 相关阅读:
    在ASP.NET GridView 中使用e.CommandArgument传递参数
    循环处理之while and do while
    MzTreeView(梅花雪)完全攻略
    FreeTextBox使用详解
    委托、线程的用法
    Master Theorem
    python jsonpath 语法总结
    python + zmail 邮件发送
    python的yaml语法
    unittest单元测试框架总结
  • 原文地址:https://www.cnblogs.com/mjn1/p/13167368.html
Copyright © 2011-2022 走看看