24

我正在将我们的代码迁移到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" />

我的问题是我EhCacheCacheManagerspring-context jar. 我想他们将实现移至其他模块,但我找不到确切的位置。

4

3 回答 3

56

根据附录 C. Migrating to Spring Framework 3.2

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

于 2012-12-19T16:19:05.357 回答
12

更新 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>
于 2013-07-20T08:26:36.783 回答
9

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

正如 SwapnilS 回答的那样,它在 spring-context-support 中。

于 2012-12-19T16:20:52.303 回答