| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.cache.CacheManager; |
| | | import org.springframework.cache.annotation.CachingConfigurerSupport; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | |
| | | @Configuration |
| | | @EnableCaching |
| | | @EnableConfigurationProperties(RedissonProperties.class) |
| | | public class RedisConfig extends CachingConfigurerSupport { |
| | | public class RedisConfig { |
| | | |
| | | @Autowired |
| | | private RedissonProperties redissonProperties; |
| | |
| | | /** |
| | | * 自定义缓存管理器 整合spring-cache |
| | | */ |
| | | @Override |
| | | @Bean |
| | | public CacheManager cacheManager() { |
| | | return new PlusSpringCacheManager(); |