Java 发现多个注释匹配的通配符是严格的,但找不到元素';ehcache:注释驱动

Java 发现多个注释匹配的通配符是严格的,但找不到元素';ehcache:注释驱动,java,spring,spring-mvc,Java,Spring,Spring Mvc,我正在使用spring开发我的应用程序。在xml文件中,我创建了一个ehcache bean。这行代码向我显示错误“发现多个注释匹配的通配符是严格的,但找不到元素“ehcache:annotation-driven”的声明”。这是我声明EcacheBean的XML文件 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta

我正在使用spring开发我的应用程序。在xml文件中,我创建了一个ehcache bean。这行代码向我显示错误“发现多个注释匹配的通配符是严格的,但找不到元素“ehcache:annotation-driven”的声明”。这是我声明EcacheBean的XML文件

<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:webflow="http://www.springframework.org/schema/webflow-config"
    xmlns:mvc="http://www.springframework.org/schema/mvc" 
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
    xmlns:task="http://www.springframework.org/schema/task"
    xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
        http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring      
        http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd
        http://www.springframework.org/schema/task 
        http://www.springframework.org/schema/task/spring-task-3.0.xsd">

在这里的xml文件中,我创建了一个ehcache bean,这行代码向我显示了错误

<ehcache:annotation-driven cache-manager="ehCacheManager" />

    <bean id="ehCacheManager"
        class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
        <property name="configLocation">
            <value>/WEB-INF/config/ehcache.xml</value>
        </property>
    </bean>

/WEB-INF/config/ehcache.xml
这是xml文件显示给我的错误

Multiple annotations found at this line:
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ehcache:annotation-driven'.
    - schema_reference.4: Failed to read schema document 'http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-
     spring/ehcache-spring-1.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the 
     document is not <xsd:schema>.
在此行找到多个批注:
-cvc复杂类型.2.4.c:匹配的通配符是严格的,但找不到元素“ehcache:annotation-driven”的声明。
-架构\u引用。4:未能读取架构文档'http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-
spring/ehcache-spring-1.1.xsd',因为1)找不到文档;2) 文件无法读取;3) 的根元素
文件不可用。

请任何人帮助我如何解决这个问题。

不要使用google ehcache使用spring one。@M.Deinum我使用spring ehchachei在xml xsi=now中添加了这些行,它向我显示“cvc复杂类型。2.4.c:匹配的通配符是严格的,但找不到元素‘ehcache:annotation-driven’的声明你知道吗?你还在使用
ehcache
标签。发布修改后的xml,用它更新你的问题。正如之前两次提到的那样,从google中删除所有对ehcache内容的引用。删除名称空间。仅添加spring名称空间无法修复它,请将
ehcache:
前缀更改为
cache:
。不要使用google ehcache使用spring名称空间。@M.Deinum我使用了spring ehchachei在xml xsi=中添加了这些行,现在它显示给我cvc复杂类型.2.4.c:匹配的通配符是严格的,但找不到元素“ehcache:annotation-driven”的声明“你知道吗?你还在使用
ehcache
标签。发布修改后的xml,用它更新你的问题。正如之前两次提到的那样,从google中删除所有对ehcache内容的引用。删除名称空间。仅添加spring名称空间无法修复它,请将
ehcache:
前缀更改为
cache: