@Configuration @ConditionalOnMissingBean(value=org.springframework.context.MessageSource.class, search=CURRENT) @Conditional(value=MessageSourceAutoConfiguration.ResourceBundleCondition.class) @EnableConfigurationProperties @ConfigurationProperties(prefix="spring.messages") public class MessageSourceAutoConfiguration extends Object
Auto-configuration
for MessageSource
.Modifier and Type | Class and Description |
---|---|
protected static class |
MessageSourceAutoConfiguration.ResourceBundleCondition |
Constructor and Description |
---|
MessageSourceAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
String |
getBasename() |
int |
getCacheSeconds() |
Charset |
getEncoding() |
boolean |
isAlwaysUseMessageFormat() |
boolean |
isFallbackToSystemLocale() |
org.springframework.context.MessageSource |
messageSource() |
void |
setAlwaysUseMessageFormat(boolean alwaysUseMessageFormat) |
void |
setBasename(String basename) |
void |
setCacheSeconds(int cacheSeconds) |
void |
setEncoding(Charset encoding) |
void |
setFallbackToSystemLocale(boolean fallbackToSystemLocale) |
@Bean public org.springframework.context.MessageSource messageSource()
public String getBasename()
public void setBasename(String basename)
public Charset getEncoding()
public void setEncoding(Charset encoding)
public int getCacheSeconds()
public void setCacheSeconds(int cacheSeconds)
public boolean isFallbackToSystemLocale()
public void setFallbackToSystemLocale(boolean fallbackToSystemLocale)
public boolean isAlwaysUseMessageFormat()
public void setAlwaysUseMessageFormat(boolean alwaysUseMessageFormat)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.