Multiple annotations found The matching wildcard i

2019-09-04 22:52发布

I am using spring to develop my application. In xml file i create a bean of ehcache. This line of code show me error that "Multiple annotations found The matching wildcard is strict, but no declaration can be found for element 'ehcache:annotation-driven". this is my XML file where i declare echache bean

<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">

In the xml file here i cretae a bean of ehcache and this line of code show me error .

<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>

This is error that xml file show me

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>.

Please anyone help me how can resolve this problem.

0条回答
登录 后发表回答