Spring 3.2和Cache Abstraction缺少EhCache实现

hoa*_*oaz 23 spring ehcache

我正在将我们的代码迁移到Spring 3.2版本(从3.1.3开始),我遇到了Spring Cache Abstraction的问题.

我们使用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" />
Run Code Online (Sandbox Code Playgroud)

我的问题是我缺少EhCacheCacheManager类和相应的工厂bean spring-context jar.我想他们将实现转移到其他模块,但我找不到确切的位置.

Swa*_*nil 56

根据附录C.迁移到Spring Framework 3.2,

"org.springframework.cache.ehcache包中的EHCache支持类从spring-context模块移动到spring-context-support".


小智 12

更新Maven pom.xml文件对我有用.

属性:

    <org.springframework-version>3.2.3.RELEASE</org.springframework-version>
Run Code Online (Sandbox Code Playgroud)

依赖

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
Run Code Online (Sandbox Code Playgroud)


Fra*_*eau 9

使用oss.sonatype.org,您可以按名称搜索一个类,并在索引时找到它包含的工件:https://oss.sonatype.org/index.html#nexus-search ; classname~EhCacheCacheManager.

正如SwapnilS所回答的那样,它是在春天环境支持下.