diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java index f7c3463110..763e392b87 100755 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java @@ -73,6 +73,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro properties.put("server.error.include-stacktrace", "ALWAYS"); properties.put("server.servlet.jsp.init-parameters.development", "true"); properties.put("spring.reactor.stacktrace-mode.enabled", "true"); + properties.put("spring.messages.reloadable", "true"); PROPERTIES = Collections.unmodifiableMap(properties); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java index 6b229e5681..fd8e56160e 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolPropertiesIntegrationTests.java @@ -114,6 +114,17 @@ public class DevToolPropertiesIntegrationTests { .isEqualTo(ErrorProperties.IncludeStacktrace.ALWAYS.toString()); } + @Test + public void postProcessEnablesMessageSourceReloadProperty() { + SpringApplication application = new SpringApplication(TestConfiguration.class); + application.setWebApplicationType(WebApplicationType.NONE); + this.context = application.run(); + ConfigurableEnvironment environment = this.context.getEnvironment(); + Boolean property = environment.getProperty("spring.messages.reloadable", + Boolean.class); + assertThat(property).isTrue(); + } + @Configuration static class TestConfiguration {