org.zodiac.autoconfigure.redis.RedisTemplateAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.redis;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.redis.condition.ConditionalOnRedisEnabled;
import org.zodiac.autoconfigure.security.jwt.SecurityJwtRedisAutoConfiguration;
/**
* RedisTemplate 配置。
*
*/
@EnableCaching
@SpringBootConfiguration
@ConditionalOnRedisEnabled
@AutoConfigureBefore(value = {SecurityJwtRedisAutoConfiguration.class, RedisAutoConfiguration.class})
@ConditionalOnClass(value = {org.zodiac.redis.RedisConfigInfo.class, org.springframework.data.redis.core.RedisTemplate.class})
public class RedisTemplateAutoConfiguration implements RedisSerializerConfigable {
public RedisTemplateAutoConfiguration() {
super();
}
/**
* value 值 序列化。
*
* @return RedisSerializer
*/
@Override
@Bean
@ConditionalOnMissingBean(value = {org.springframework.data.redis.serializer.RedisSerializer.class})
public org.springframework.data.redis.serializer.RedisSerializer