diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration.java index 6edd2d20d9..86bebd6585 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration.java @@ -51,6 +51,7 @@ import org.springframework.util.StringUtils; class HazelcastServerConfiguration { static final String CONFIG_SYSTEM_PROPERTY = "hazelcast.config"; + static final String HAZELCAST_LOGGING_TYPE = "hazelcast.logging.type"; private static HazelcastInstance getHazelcastInstance(Config config) { @@ -126,7 +127,7 @@ class HazelcastServerConfiguration { @Configuration(proxyBeanMethods = false) @ConditionalOnClass(org.slf4j.Logger.class) - static class LoggingHazelcastConfigCustomizerConfiguration { + static class HazelcastLoggingConfigCustomizerConfiguration { @Bean @Order(0) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java index 798eb9845f..5833ed0a2b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java @@ -207,7 +207,7 @@ class HazelcastAutoConfigurationServerTests { } @Test - void configWithDefaultLoggingTypeSlf4j() { + void autoConfiguredConfigSetsHazelcastLoggingToSlf4j() { this.contextRunner.run((context) -> { Config config = context.getBean(HazelcastInstance.class).getConfig(); assertThat(config.getProperty(HazelcastServerConfiguration.HAZELCAST_LOGGING_TYPE)).isEqualTo("slf4j"); @@ -215,7 +215,7 @@ class HazelcastAutoConfigurationServerTests { } @Test - void configWithExplicitLoggingType() { + void autoConfiguredConfigCanOverrideHazelcastLogging() { this.contextRunner.withUserConfiguration(HazelcastConfigWithJDKLogging.class).run((context) -> { Config config = context.getBean(HazelcastInstance.class).getConfig(); assertThat(config.getProperty(HazelcastServerConfiguration.HAZELCAST_LOGGING_TYPE)).isEqualTo("jdk");