mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Make devtools set spring.messages.reloadable=true
Update `DevToolsPropertyDefaultsPostProcessor` to automatically set the recently introduced `spring.messages.reloadable` property to `true`. Closes gh-14699
This commit is contained in:
parent
01b8667dd7
commit
1d8e4a8f5c
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user