@ConditionalOnClass(value={org.springframework.data.redis.serializer.RedisSerializer.class,org.springframework.data.redis.cache.RedisCacheConfiguration.class,org.springframework.cache.annotation.CachingConfigurerSupport.class,org.springframework.data.redis.core.RedisTemplate.class})
@ConditionalOnBean(value=org.springframework.data.redis.connection.RedisConnectionFactory.class)
public class RedisConfig
extends Object
implements org.springframework.beans.factory.InitializingBean
| 构造器和说明 |
|---|
RedisConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
org.springframework.data.redis.cache.RedisCacheManager |
cacheManager(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
Cache manager cache manager.
|
org.springframework.data.redis.cache.RedisCacheConfiguration |
redisCacheConfiguration() |
org.springframework.data.redis.core.RedisTemplate<Object,Object> |
redisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory factory) |
public void afterPropertiesSet()
throws Exception
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanException@Bean(value="redisCacheManager")
@ConditionalOnMissingBean(name="redisCacheManager",
value=org.springframework.data.redis.cache.RedisCacheWriter.class)
public org.springframework.data.redis.cache.RedisCacheManager cacheManager(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
connectionFactory - the connection factorypublic org.springframework.data.redis.cache.RedisCacheConfiguration redisCacheConfiguration()
Copyright © 2020. All rights reserved.