This MessageSource caches both the accessed ResourceBundle instances and the generated MessageFormats for each message. It also implements rendering of no-arg messages without MessageFormat, as supported by the AbstractMessageSource base class. The caching provided by this MessageSource is significantly faster than the built-in caching of the java.util.ResourceBundle
class.
Unfortunately, java.util.ResourceBundle
caches loaded bundles forever: Reloading a bundle during VM execution is not possible. As this MessageSource relies on ResourceBundle, it faces the same limitation. Consider {@link ReloadableResourceBundleMessageSource} for an alternativethat is capable of refreshing the underlying bundle files.
@author Rod Johnson
@author Juergen Hoeller
@see #setBasenames
@see ReloadableResourceBundleMessageSource
@see java.util.ResourceBundle
@see java.text.MessageFormat
|
|
|
|