| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.dromara.common.redis.config.properties.RedissonProperties; |
| | | import org.dromara.common.redis.handler.KeyPrefixHandler; |
| | | import org.dromara.common.redis.manager.PlusSpringCacheManager; |
| | | import org.redisson.client.codec.StringCodec; |
| | | import org.redisson.codec.CompositeCodec; |
| | | import org.redisson.codec.TypedJsonJacksonCodec; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.cache.CacheManager; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.context.annotation.Bean; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Slf4j |
| | | @AutoConfiguration |
| | | @EnableCaching |
| | | @EnableConfigurationProperties(RedissonProperties.class) |
| | | public class RedisConfig { |
| | | |
| | |
| | | } |
| | | log.info("初始化 redis 配置"); |
| | | }; |
| | | } |
| | | |
| | | /** |
| | | * 自定义缓存管理器 整合spring-cache |
| | | */ |
| | | @Bean |
| | | public CacheManager cacheManager() { |
| | | return new PlusSpringCacheManager(); |
| | | } |
| | | |
| | | /** |