public class CasReloadableMessageBundle
extends org.springframework.context.support.ReloadableResourceBundleMessageSource
ReloadableResourceBundleMessageSource whose sole concern
is to print a WARN message in cases where a language key is not found in the active and
default bundles.
Note: By default, if a key not found in a localized bundle, Spring will auto-fallback
to the default bundle that is messages.properties. However, if the key is also
not found in the default bundle, and AbstractMessageSource.setUseCodeAsDefaultMessage(boolean)
is set to true, then only the requested code itself will be used as the message to display.
In this case, the class will issue a WARN message instructing the caller that the bundle
needs further attention. If AbstractMessageSource.setUseCodeAsDefaultMessage(boolean) is set to false,
only then a null value will be returned, which subsequently causes an instance
of NoSuchMessageException to be thrown.
| Constructor and Description |
|---|
CasReloadableMessageBundle() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getDefaultMessage(String code) |
protected String |
getMessageInternal(String code,
Object[] args,
Locale locale) |
void |
setBasenames(String... basenames) |
calculateAllFilenames, calculateFilenamesForLocale, clearCache, clearCacheIncludingAncestors, getMergedProperties, getProperties, loadProperties, refreshProperties, resolveCode, resolveCodeWithoutArguments, setBasename, setCacheSeconds, setDefaultEncoding, setFallbackToSystemLocale, setFileEncodings, setPropertiesPersister, setResourceLoader, toStringgetCommonMessages, getMessage, getMessage, getMessage, getMessageFromParent, getParentMessageSource, isUseCodeAsDefaultMessage, resolveArguments, setCommonMessages, setParentMessageSource, setUseCodeAsDefaultMessageprotected String getDefaultMessage(String code)
getDefaultMessage in class org.springframework.context.support.AbstractMessageSourceprotected String getMessageInternal(String code, Object[] args, Locale locale)
getMessageInternal in class org.springframework.context.support.AbstractMessageSourcepublic void setBasenames(String... basenames)
setBasenames in class org.springframework.context.support.ReloadableResourceBundleMessageSourceCopyright © 2004-2015 Apereo. All Rights Reserved.