org.zodiac.autoconfigure.redis.RedisProtoStuffAutoConfiguration 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.context.annotation.Bean;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.zodiac.autoconfigure.redis.condition.ConditionalOnRedisEnabled;
/**
* ProtoStuff 序列化配置。
*
*/
@SpringBootConfiguration
@ConditionalOnRedisEnabled
@ConditionalOnClass(name = {"io.protostuff.Schema"})
@AutoConfigureBefore(value = {RedisTemplateAutoConfiguration.class})
public class RedisProtoStuffAutoConfiguration implements RedisSerializerConfigable {
@Bean
@ConditionalOnMissingBean
@Override
public RedisSerializer