@Configuration @AutoConfigureAfter(value=org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration.class) @EnableConfigurationProperties(value=RedisProperties.class) public class RedisAutoConfig extends Object
Constructor and Description |
---|
RedisAutoConfig() |
Modifier and Type | Method and Description |
---|---|
Redis |
redis(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate,
org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate) |
org.springframework.data.redis.core.RedisTemplate<String,Object> |
yueRedisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
支持FastJson进行Redis存储对象序列/反序列化
|
@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
@Bean @Primary @ConditionalOnBean(value={org.springframework.data.redis.core.RedisTemplate.class,org.springframework.data.redis.core.StringRedisTemplate.class}) public Redis redis(@Qualifier(value="yueRedisTemplate") org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate, org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.