2017-04-14 3 views
1

EhCache를 Spring과 함께 사용하고 싶습니다. 내 spring.xml이 줄을 추가 말했다 tutorial 따랐습니다 :EhCache Spring XML 통합 네임 스페이스

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

문제는으로 Ehcache 네임 스페이스 튜토리얼에 존재하지 않는 것입니다. 발견 나는 XSD의 URL을 따르는 경우에 실제로 나는 그래서는 A (404)

을하지

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

하지만 난 XSD 스키마에 대한 오류를 얻을 : 구글에서 찾고 난 다음 봄 구성을 발견했습니다 질문은 네임 스페이스와 스키마를 어디에서 찾을 수 있습니까? 명확성을 위해서

, 여기에 내가 주석 중심의 줄에 얻을 오류입니다 :

감사합니다.

답변

1

내가 사용

<cache:annotation-driven cache-manager="cacheManager" /> 

<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 

그런 다음으로 Ehcache에 결합하는 특정 그것을했다 cacheManager 콩

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" ... /> 
+0

에, 감사합니다! 발견하지 못하는 이유는 무엇인지 모르겠다 ... 나는이 프로젝트가 Spring 내에서 모두 inglobated되었다고 생각한다. – Aurasphere