public class CachingConfigurer
extends org.springframework.cache.annotation.CachingConfigurerSupport
| 构造器和说明 |
|---|
CachingConfigurer() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.cache.CacheManager |
cacheManager()
重写这个方法,目的是用以提供默认的cacheManager
|
org.springframework.cache.interceptor.CacheErrorHandler |
errorHandler()
如果cache出错, 我们会记录在日志里,方便排查,比如反序列化异常
|
org.springframework.cache.interceptor.KeyGenerator |
keyGenerator()
在使用@Cacheable时,如果不指定key,则使用找个默认的key生成器生成的key
|
public org.springframework.cache.CacheManager cacheManager()
cacheManager 在接口中 org.springframework.cache.annotation.CachingConfigurercacheManager 在类中 org.springframework.cache.annotation.CachingConfigurerSupportpublic org.springframework.cache.interceptor.CacheErrorHandler errorHandler()
errorHandler 在接口中 org.springframework.cache.annotation.CachingConfigurererrorHandler 在类中 org.springframework.cache.annotation.CachingConfigurerSupport@Bean public org.springframework.cache.interceptor.KeyGenerator keyGenerator()
keyGenerator 在接口中 org.springframework.cache.annotation.CachingConfigurerkeyGenerator 在类中 org.springframework.cache.annotation.CachingConfigurerSupportCopyright © 2020. All rights reserved.