mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Add spring.messages.cacheSeconds to global config
Fixes gh-625
This commit is contained in:
parent
72d7c286c0
commit
5ed49462c4
@ -58,6 +58,8 @@ public class MessageSourceAutoConfiguration implements EnvironmentAware {
|
||||
}
|
||||
String encoding = this.environment.getProperty("encoding", "utf-8");
|
||||
messageSource.setDefaultEncoding(encoding);
|
||||
messageSource.setCacheSeconds(this.environment.getProperty("cacheSeconds",
|
||||
Integer.class, -1));
|
||||
return messageSource;
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,7 @@ content into your application; rather pick only the properties that you need.
|
||||
# INTERNATIONALIZATION ({sc-spring-boot-autoconfigure}/MessageSourceAutoConfiguration.{sc-ext}[MessageSourceAutoConfiguration])
|
||||
spring.messages.basename=messages
|
||||
spring.messages.encoding=UTF-8
|
||||
spring.messages.cacheSeconds=-1
|
||||
|
||||
[[common-application-properties-security]]
|
||||
# SECURITY ({sc-spring-boot-autoconfigure}/security/SecurityProperties.{sc-ext}[SecurityProperties])
|
||||
|
Loading…
Reference in New Issue
Block a user