@EnableCaching @AutoConfiguration(before=org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration.class) @EnableConfigurationProperties(value=MsRedisProperties.class) public class RedisTemplateConfiguration extends Object implements MsRedisSerializerConfigAble
TYPE_NAME| 构造器和说明 |
|---|
RedisTemplateConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
RedisRepository |
msRedis(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate,
org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate) |
org.springframework.data.redis.serializer.RedisSerializer<Object> |
redisSerializer(MsRedisProperties properties)
value 值 序列化
|
org.springframework.data.redis.core.RedisTemplate<String,Object> |
redisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory,
org.springframework.data.redis.serializer.RedisSerializer<Object> redisSerializer) |
org.springframework.data.redis.core.ValueOperations |
valueOperations(org.springframework.data.redis.core.RedisTemplate redisTemplate) |
defaultRedisSerializer@Bean @ConditionalOnMissingBean(value=org.springframework.data.redis.serializer.RedisSerializer.class) public org.springframework.data.redis.serializer.RedisSerializer<Object> redisSerializer(MsRedisProperties properties)
redisSerializer 在接口中 MsRedisSerializerConfigAbleproperties - 配置@Bean(name="redisTemplate") @ConditionalOnMissingBean(name="redisTemplate") public org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory, org.springframework.data.redis.serializer.RedisSerializer<Object> redisSerializer)
@Bean @ConditionalOnMissingBean(value=org.springframework.data.redis.core.ValueOperations.class) public org.springframework.data.redis.core.ValueOperations valueOperations(org.springframework.data.redis.core.RedisTemplate redisTemplate)
@Bean public RedisRepository msRedis(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate, org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate)
Copyright © 2023. All rights reserved.