java - EhCache Spring XML integration namespace -
i'd use ehcache spring. i've followed tutorial said add line spring.xml:
<ehcache:annotation-driven cache-manager="ehcachemanager" />
the problem ehcache namespace not present in tutorial. looking on google i've found out following spring configuration:
<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:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.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">
but error xsd schema not found , if follow xsd url 404.
so question is, find namespace , schema?
for sake of clarity, here's errors on annotation-driven line:
- cvc-complex-type.2.4.c: matching wildcard strict, no declaration can found element 'ehcache:annotation-driven'.
- schema_reference.4: failed read schema document 'http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd', because 1) not find document; 2) document not read; 3) root element of document not .
thank you.
i use:
<beans ... xmlns:cache="http://www.springframework.org/schema/cache" xsi:schemalocation=" ... http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
and
<cache:annotation-driven cache-manager="cachemanager" />
then specific binding ehcache in cachemanager bean
<bean id="cachemanager" class="org.springframework.cache.ehcache.ehcachecachemanager" ... />
Comments
Post a Comment