diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/config/RedisConfig.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/config/RedisConfiguration.java similarity index 97% rename from ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/config/RedisConfig.java rename to ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/config/RedisConfiguration.java index 8ab3a247..8cc0cda1 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/config/RedisConfig.java +++ b/ruoyi-common/ruoyi-common-redis/src/main/java/com/ruoyi/common/redis/config/RedisConfiguration.java @@ -10,7 +10,9 @@ import org.redisson.codec.JsonJacksonCodec; import org.redisson.config.Config; import org.redisson.spring.cache.CacheConfig; import org.redisson.spring.cache.RedissonSpringCacheManager; +import org.redisson.spring.starter.RedissonAutoConfiguration; 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.data.redis.RedisProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -32,10 +34,11 @@ import java.util.stream.Collectors; * @author Lion Li */ @Slf4j +@AutoConfigureBefore(RedissonAutoConfiguration.class) @EnableConfigurationProperties(RedissonProperties.class) @Configuration @EnableCaching -public class RedisConfig extends CachingConfigurerSupport { +public class RedisConfiguration extends CachingConfigurerSupport { private static final String REDIS_PROTOCOL_PREFIX = "redis://"; private static final String REDISS_PROTOCOL_PREFIX = "rediss://"; diff --git a/ruoyi-common/ruoyi-common-redis/src/main/resources/META-INF/spring.factories b/ruoyi-common/ruoyi-common-redis/src/main/resources/META-INF/spring.factories index 53bea846..a23b8825 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/resources/META-INF/spring.factories +++ b/ruoyi-common/ruoyi-common-redis/src/main/resources/META-INF/spring.factories @@ -1,4 +1,4 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.ruoyi.common.redis.config.RedisConfig - - +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.ruoyi.common.redis.config.RedisConfiguration + +