类 RedisAutoConfig


  • @Configuration
    @Import(ApiIdempotentController.class)
    @AutoConfigureAfter(org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration.class)
    @EnableConfigurationProperties(RedisProperties.class)
    public class RedisAutoConfig
    extends Object
    redis自动配置
    从以下版本开始:
    2018年6月11日
    作者:
    ylyue
    • 构造器详细资料

      • RedisAutoConfig

        public RedisAutoConfig()
    • 方法详细资料

      • yueRedisTemplate

        @Bean
        public org.springframework.data.redis.core.RedisTemplate<String,​Object> yueRedisTemplate​(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)

        支持FastJson进行Redis存储对象序列/反序列化

        https://github.com/alibaba/fastjson/wiki/%E5%9C%A8-Spring-%E4%B8%AD%E9%9B%86%E6%88%90-Fastjson

      • redis

        @Bean
        @Primary
        @ConditionalOnBean({org.springframework.data.redis.core.RedisTemplate.class,org.springframework.data.redis.core.StringRedisTemplate.class})
        public Redis redis​(@Qualifier("yueRedisTemplate")
                           org.springframework.data.redis.core.RedisTemplate<String,​Object> redisTemplate,
                           org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate)