Browse Source

Polish "Align with breaking API changes in RedisCacheManager"

Closes gh-9734
pull/9771/head
Stephane Nicoll 9 years ago
parent
commit
9df0992bd9
  1. 1
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/RedisCacheConfiguration.java
  2. 6
      spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java

1
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/RedisCacheConfiguration.java vendored

@ -57,7 +57,6 @@ class RedisCacheConfiguration { @@ -57,7 +57,6 @@ class RedisCacheConfiguration {
@Bean
public RedisCacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) {
RedisCacheManagerBuilder builder = RedisCacheManager.builder(redisConnectionFactory);
List<String> cacheNames = this.cacheProperties.getCacheNames();
if (!cacheNames.isEmpty()) {

6
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java vendored

@ -283,9 +283,9 @@ public class CacheAutoConfigurationTests { @@ -283,9 +283,9 @@ public class CacheAutoConfigurationTests {
RedisCacheManager cacheManager = validateCacheManager(context,
RedisCacheManager.class);
assertThat(cacheManager.getCacheNames()).isEmpty();
org.springframework.data.redis.cache.RedisCacheConfiguration configuration = (org.springframework.data.redis.cache.RedisCacheConfiguration) new DirectFieldAccessor(
cacheManager).getPropertyValue("defaultCacheConfig");
assertThat(configuration.usePrefix()).isTrue();
assertThat(((org.springframework.data.redis.cache.RedisCacheConfiguration)
new DirectFieldAccessor(cacheManager).getPropertyValue(
"defaultCacheConfig")).usePrefix()).isTrue();
});
}

Loading…
Cancel
Save