类 CachingConfigurerSupport
- java.lang.Object
- org.springframework.cache.annotation.CachingConfigurerSupport
- 所有已实现的接口:
CachingConfigurer
- 直接已知子类:
JCacheConfigurerSupport
public class CachingConfigurerSupport extends Object implements CachingConfigurer
An implementation ofCachingConfigurer
with empty methods allowing sub-classes to override only the methods they're interested in.- 从以下版本开始:
- 4.1
- 作者:
- Stephane Nicoll
- 另请参阅:
CachingConfigurer
构造器概要
构造器 构造器 说明 CachingConfigurerSupport()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CacheManager
cacheManager()
Return the cache manager bean to use for annotation-driven cache management.CacheResolver
cacheResolver()
Return theCacheResolver
bean to use to resolve regular caches for annotation-driven cache management.CacheErrorHandler
errorHandler()
Return theCacheErrorHandler
to use to handle cache-related errors.KeyGenerator
keyGenerator()
Return the key generator bean to use for annotation-driven cache management.
构造器详细资料
CachingConfigurerSupport
public CachingConfigurerSupport()
方法详细资料
cacheManager
public CacheManager cacheManager()
从接口复制的说明:CachingConfigurer
Return the cache manager bean to use for annotation-driven cache management. A defaultCacheResolver
will be initialized behind the scenes with this cache manager. For more fine-grained management of the cache resolution, consider setting theCacheResolver
directly.Implementations must explicitly declare
@Bean
, e.g.@Configuration @EnableCaching public class AppConfig extends CachingConfigurerSupport { @Bean // important! @Override public CacheManager cacheManager() { // configure and return CacheManager instance } // ... }
See @EnableCaching
for more complete examples.- 指定者:
cacheManager
在接口中CachingConfigurer
cacheResolver
public CacheResolver cacheResolver()
从接口复制的说明:CachingConfigurer
Return theCacheResolver
bean to use to resolve regular caches for annotation-driven cache management. This is an alternative and more powerful option of specifying theCacheManager
to use.If both a
CachingConfigurer.cacheManager()
and#cacheResolver()
are set, the cache manager is ignored.Implementations must explicitly declare
@Bean
, e.g.@Configuration @EnableCaching public class AppConfig extends CachingConfigurerSupport { @Bean // important! @Override public CacheResolver cacheResolver() { // configure and return CacheResolver instance } // ... }
SeeEnableCaching
for more complete examples.- 指定者:
cacheResolver
在接口中CachingConfigurer
keyGenerator
public KeyGenerator keyGenerator()
从接口复制的说明:CachingConfigurer
Return the key generator bean to use for annotation-driven cache management. Implementations must explicitly declare@Bean
, e.g.@Configuration @EnableCaching public class AppConfig extends CachingConfigurerSupport { @Bean // important! @Override public KeyGenerator keyGenerator() { // configure and return KeyGenerator instance } // ... }
See @EnableCaching
for more complete examples.- 指定者:
keyGenerator
在接口中CachingConfigurer
errorHandler
public CacheErrorHandler errorHandler()
从接口复制的说明:CachingConfigurer
Return theCacheErrorHandler
to use to handle cache-related errors.By default,
SimpleCacheErrorHandler
is used and simply throws the exception back at the client.Implementations must explicitly declare
@Bean
, e.g.@Configuration @EnableCaching public class AppConfig extends CachingConfigurerSupport { @Bean // important! @Override public CacheErrorHandler errorHandler() { // configure and return CacheErrorHandler instance } // ... }
See @EnableCaching
for more complete examples.- 指定者:
errorHandler
在接口中CachingConfigurer