|
|
@ -10,7 +10,9 @@ import org.redisson.codec.JsonJacksonCodec;
|
|
|
|
import org.redisson.config.Config;
|
|
|
|
import org.redisson.config.Config;
|
|
|
|
import org.redisson.spring.cache.CacheConfig;
|
|
|
|
import org.redisson.spring.cache.CacheConfig;
|
|
|
|
import org.redisson.spring.cache.RedissonSpringCacheManager;
|
|
|
|
import org.redisson.spring.cache.RedissonSpringCacheManager;
|
|
|
|
|
|
|
|
import org.redisson.spring.starter.RedissonAutoConfiguration;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
|
|
|
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
|
|
|
|
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
|
|
|
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
|
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
|
@ -32,10 +34,11 @@ import java.util.stream.Collectors;
|
|
|
|
* @author Lion Li
|
|
|
|
* @author Lion Li
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
|
|
|
|
|
@AutoConfigureBefore(RedissonAutoConfiguration.class)
|
|
|
|
@EnableConfigurationProperties(RedissonProperties.class)
|
|
|
|
@EnableConfigurationProperties(RedissonProperties.class)
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
@EnableCaching
|
|
|
|
@EnableCaching
|
|
|
|
public class RedisConfig extends CachingConfigurerSupport {
|
|
|
|
public class RedisConfiguration extends CachingConfigurerSupport {
|
|
|
|
|
|
|
|
|
|
|
|
private static final String REDIS_PROTOCOL_PREFIX = "redis://";
|
|
|
|
private static final String REDIS_PROTOCOL_PREFIX = "redis://";
|
|
|
|
private static final String REDISS_PROTOCOL_PREFIX = "rediss://";
|
|
|
|
private static final String REDISS_PROTOCOL_PREFIX = "rediss://";
|