我迁移我们的代码和Spring 3.2版本(3.1.3自)和我有同春缓存抽象的问题。
我们使用了Ehcache实施CacheManager
和它的配置是相当简单:
<cache:annotation-driven />
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cache-manager-ref="ehcache" />
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="classpath:ehcache.xml" />
我的问题是,我很想念EhCacheCacheManager
类,并在相应的工厂豆spring-context jar
。 我想他们搬到实施一些其他的模块,但我无法找到确切位置。
根据附录C.迁移到Spring框架3.2 ,
“在org.springframework.cache.ehcache包中的EHCache支持类从弹簧上下文模块移动到弹簧-上下文支持”。
更新Maven的pom.xml文件为我工作。
属性:
<org.springframework-version>3.2.3.RELEASE</org.springframework-version>
依赖
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${org.springframework-version}</version>
</dependency>
使用oss.sonatype.org ,您可以按名称搜索类和发现其中的文物它包含,它们被编入索引时: https://oss.sonatype.org/index.html#nexus-search;classname~EhCacheCacheManager 。
作为SwapnilS已经回答了,它在春天上下文支持。