程序包 cn.gybyt.config

类 RedisConfig


  • @Configuration
    @ConditionalOnClass(org.springframework.data.redis.connection.RedisConnectionFactory.class)
    @ConditionalOnProperty(prefix="gybyt",
                           name="enable-cache",
                           havingValue="true",
                           matchIfMissing=true)
    public class RedisConfig
    extends Object
    redis配置
    • 构造器详细资料

      • RedisConfig

        public RedisConfig()
    • 方法详细资料

      • gybytRedisTemplate

        @Bean
        public org.springframework.data.redis.core.RedisTemplate<String,​Object> gybytRedisTemplate​(org.springframework.data.redis.connection.RedisConnectionFactory factory)
        注入RedisTemplate对象
        参数:
        factory -
        返回:
      • gybytRedisStringTemplate

        @Bean
        public org.springframework.data.redis.core.RedisTemplate<String,​String> gybytRedisStringTemplate​(org.springframework.data.redis.connection.RedisConnectionFactory factory)
        注入RedisTemplate对象
        参数:
        factory -
        返回:
      • gybytRedisCacheManager

        @Bean
        public org.springframework.cache.CacheManager gybytRedisCacheManager​(@Qualifier("gybytRedisTemplate")
                                                                             org.springframework.data.redis.core.RedisTemplate<String,​Object> redisTemplate)
        注入RedisCacheManage对象
        参数:
        redisTemplate -
        返回: