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”

     
  • 相关阅读:
    中缀表达式std
    后缀表达式
    取石头游戏
    LeetCode404Sum of Left Leaves左叶子之和
    LeetCode387First Unique Character in a String字符串中第一个唯一字符
    简单排列习题2.5 的 2
    周期串Uva455 P37 3-4
    【递归】分形
    【递归】普通递归关系(矩阵快速幂)
    P3486 [POI2009]KON-Ticket Inspector
  • 原文地址:https://www.cnblogs.com/mjn1/p/13167368.html
Copyright © 2011-2022 走看看