小编Vin*_*ers的帖子

如何为Spring Cache设置自定义KeyGenerator?

我正在使用Spring 3.1,我想使用新的缓存功能.然后,我试过:

<cache:annotation-driven />

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
    p:cache-manager-ref="ehcache" />

<!-- Ehcache library setup -->
<bean id="ehcache"
    class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
    p:config-location="classpath:ehcache.xml" />
Run Code Online (Sandbox Code Playgroud)

但我没有找到配置我的自定义KeyGenerator的方法.任何的想法?

java spring caching ehcache

3
推荐指数
2
解决办法
2万
查看次数

标签 统计

caching ×1

ehcache ×1

java ×1

spring ×1