Class MessageSourceAutoConfiguration
- java.lang.Object
- org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration
@Configuration @ConditionalOnMissingBean(value=org.springframework.context.MessageSource.class, search=CURRENT) @Conditional(ResourceBundleCondition.class) @EnableConfigurationProperties @ConfigurationProperties(prefix="spring.messages") public class MessageSourceAutoConfiguration extends Object
Auto-configuration
forMessageSource
.
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
MessageSourceAutoConfiguration.ResourceBundleCondition
Constructor Summary
Constructors Constructor Description MessageSourceAutoConfiguration()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
Constructor Detail
MessageSourceAutoConfiguration
public MessageSourceAutoConfiguration()
Method Detail
messageSource
@Bean public org.springframework.context.MessageSource messageSource()
getBasename
public String getBasename()
setBasename
public void setBasename(String basename)
getEncoding
public Charset getEncoding()
setEncoding
public void setEncoding(Charset encoding)
getCacheSeconds
public int getCacheSeconds()
setCacheSeconds
public void setCacheSeconds(int cacheSeconds)
isFallbackToSystemLocale
public boolean isFallbackToSystemLocale()
setFallbackToSystemLocale
public void setFallbackToSystemLocale(boolean fallbackToSystemLocale)
isAlwaysUseMessageFormat
public boolean isAlwaysUseMessageFormat()
setAlwaysUseMessageFormat
public void setAlwaysUseMessageFormat(boolean alwaysUseMessageFormat)