From e0aa90cf32e2ae71885271c5645a8b468e46cbec Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 12 Jun 2019 17:41:30 -0700 Subject: [PATCH] Fix incomplete polish of RedisSessionProperties Fix polish commit from 919913ae66 to correctly name the property getter/setters. See gh-17022 --- .../autoconfigure/session/RedisSessionConfiguration.java | 6 +++--- .../boot/autoconfigure/session/RedisSessionProperties.java | 6 +++--- .../session/SessionAutoConfigurationRedisTests.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java index 810916f627..577169ec9f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java @@ -54,14 +54,14 @@ class RedisSessionConfiguration { @Bean @ConditionalOnMissingBean public ConfigureRedisAction configureRedisAction(RedisSessionProperties redisSessionProperties) { - switch (redisSessionProperties.getConfigurationStrategy()) { + switch (redisSessionProperties.getConfigureAction()) { case NOTIFY_KEYSPACE_EVENTS: return new ConfigureNotifyKeyspaceEventsAction(); case NONE: return ConfigureRedisAction.NO_OP; } - throw new IllegalStateException("Unsupported redis configuration strategy '" - + redisSessionProperties.getConfigurationStrategy() + "'."); + throw new IllegalStateException( + "Unsupported redis configure action '" + redisSessionProperties.getConfigureAction() + "'."); } @Configuration diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionProperties.java index ed04db251a..df08dcf90e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionProperties.java @@ -75,12 +75,12 @@ public class RedisSessionProperties { this.cleanupCron = cleanupCron; } - public ConfigureAction getConfigurationStrategy() { + public ConfigureAction getConfigureAction() { return this.configureAction; } - public void setConfigurationStrategy(ConfigureAction configurationStrategy) { - this.configureAction = configurationStrategy; + public void setConfigureAction(ConfigureAction configureAction) { + this.configureAction = configureAction; } /** diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationRedisTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationRedisTests.java index 8bfbcc9167..0f52cdf3e0 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationRedisTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationRedisTests.java @@ -89,7 +89,7 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio } @Test - void redisSessionConfigureNoStrategy() { + void redisSessionWithConfigureActionNone() { this.contextRunner.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class)) .withPropertyValues("spring.session.store-type=redis", "spring.session.redis.configure-action=none", "spring.redis.port=" + redis.getFirstMappedPort()) @@ -97,7 +97,7 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio } @Test - void redisSessionConfigureDefaultStrategy() { + void redisSessionWithDefaultConfigureActionNone() { this.contextRunner.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class)) .withPropertyValues("spring.session.store-type=redis", "spring.redis.port=" + redis.getFirstMappedPort()) @@ -106,7 +106,7 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio } @Test - void redisSessionConfigureCustomStrategy() { + void redisSessionWithCustomConfigureRedisActionBean() { this.contextRunner.withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class)) .withUserConfiguration(MaxEntriesRedisAction.class) .withPropertyValues("spring.session.store-type=redis",