类 RedisConfig
- java.lang.Object
-
- cn.gybyt.web.config.RedisConfig
-
@Configuration(proxyBeanMethods=false) @ConditionalOnClass(org.springframework.data.redis.connection.RedisConnectionFactory.class) @ConditionalOnProperty(prefix="gybyt", name="enable-cache", havingValue="true", matchIfMissing=true) public class RedisConfig extends Objectredis配置
-
-
构造器概要
构造器 构造器 说明 RedisConfig()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.springframework.cache.CacheManagercacheManager(org.springframework.data.redis.core.RedisTemplate redisTemplate)注入RedisCacheManage对象org.springframework.data.redis.core.RedisTemplate<String,Object>redisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory factory)注入RedisTemplate对象
-
-
-
方法详细资料
-
redisTemplate
@Bean(name="gybytRedisTemplate") public org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory factory)
注入RedisTemplate对象- 参数:
factory-- 返回:
-
cacheManager
@Bean(name="gybytRedisCacheManager") public org.springframework.cache.CacheManager cacheManager(@Qualifier("gybytRedisTemplate") org.springframework.data.redis.core.RedisTemplate redisTemplate)注入RedisCacheManage对象- 参数:
redisTemplate-- 返回:
-
-