@Configuration @EnableCaching @ConditionalOnClass(name="org.springframework.data.redis.core.RedisOperations") public class SpringCacheConfig extends Object
| 构造器和说明 |
|---|
SpringCacheConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.cache.CacheManager |
cacheManager()
定义缓存redis json 序列化
|
org.springframework.cache.interceptor.KeyGenerator |
keyGeneratorStrategy()
自定义key生成策略
|
SpringCacheUtil |
springCacheUtil() |
@Bean(value="keyGeneratorStrategy") public org.springframework.cache.interceptor.KeyGenerator keyGeneratorStrategy()
@Bean public SpringCacheUtil springCacheUtil()
@Bean public org.springframework.cache.CacheManager cacheManager()
Copyright © 2023. All rights reserved.