Package org.chenile.core.i18n
Class MultipleMessageSource
- All Implemented Interfaces:
Aware
,HierarchicalMessageSource
,MessageSource
,ResourceLoaderAware
This can be used in lieu of the default Message Source. It provides an ability to modularize
messages.properties resource bundle.
By default, the spring message source does not load multiple messages.properties in multiple jars. It picks up the first file it could find in the class path instead of looking for multiple messages.properties files in the class path (presumably in multiple jar files) But this behaviour is desired to provide modularization. This uses the PathMatchingResourcePatternResolver to achieve this.
By default, the spring message source does not load multiple messages.properties in multiple jars. It picks up the first file it could find in the class path instead of looking for multiple messages.properties files in the class path (presumably in multiple jar files) But this behaviour is desired to provide modularization. This uses the PathMatchingResourcePatternResolver to achieve this.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.context.support.ReloadableResourceBundleMessageSource
ReloadableResourceBundleMessageSource.PropertiesHolder
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private final PathMatchingResourcePatternResolver
Fields inherited from class org.springframework.context.support.MessageSourceSupport
logger
-
Constructor Summary
-
Method Summary
Methods inherited from class org.springframework.context.support.ReloadableResourceBundleMessageSource
calculateAllFilenames, clearCache, clearCacheIncludingAncestors, collectPropertiesToMerge, getMergedProperties, getProperties, loadProperties, mergeProperties, newProperties, refreshProperties, resolveCode, resolveCodeWithoutArguments, resolveResource, setConcurrentRefresh, setFileEncodings, setFileExtensions, setPropertiesPersister, setResourceLoader, toString
Methods inherited from class org.springframework.context.support.AbstractResourceBasedMessageSource
addBasenames, getBasenameSet, getCacheMillis, getDefaultEncoding, getDefaultLocale, isFallbackToSystemLocale, setBasename, setBasenames, setCacheMillis, setCacheSeconds, setDefaultEncoding, setDefaultLocale, setFallbackToSystemLocale
Methods inherited from class org.springframework.context.support.AbstractMessageSource
getCommonMessages, getDefaultMessage, getDefaultMessage, getMessage, getMessage, getMessage, getMessageFromParent, getMessageInternal, getParentMessageSource, isUseCodeAsDefaultMessage, resolveArguments, setCommonMessages, setParentMessageSource, setUseCodeAsDefaultMessage
Methods inherited from class org.springframework.context.support.MessageSourceSupport
createMessageFormat, formatMessage, isAlwaysUseMessageFormat, renderDefaultMessage, setAlwaysUseMessageFormat
-
Field Details
-
PROPERTIES_SUFFIX
- See Also:
-
resolver
-
-
Constructor Details
-
MultipleMessageSource
public MultipleMessageSource()
-
-
Method Details
-
calculateFilenamesForLocale
- Overrides:
calculateFilenamesForLocale
in classReloadableResourceBundleMessageSource
-