Add missing `@ConditionalOnClass` check on RedisCacheConfiguration

Closes gh-13508
pull/13946/head
Stephane Nicoll 7 years ago
parent 6547fc6c6e
commit 62c93a4b9a

@ -23,6 +23,7 @@ import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.cache.CacheProperties.Redis;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
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.CacheManager;
@ -45,6 +46,7 @@ import org.springframework.data.redis.serializer.RedisSerializationContext.Seria
* @since 1.3.0
*/
@Configuration
@ConditionalOnClass(RedisConnectionFactory.class)
@AutoConfigureAfter(RedisAutoConfiguration.class)
@ConditionalOnBean(RedisConnectionFactory.class)
@ConditionalOnMissingBean(CacheManager.class)

Loading…
Cancel
Save