| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.springframework.context.support.AbstractNestingMessageSource | +--org.springframework.context.support.ResourceBundleMessageSource
MessageSource that accesses the ResourceBundles with the specified basenames. This class relies on the underlying JDK's java.util.ResourceBundle implementation.
Unfortunately, java.util.ResourceBundle caches loaded bundles indefinitely. Reloading a bundle during VM execution is not possible by any means. As this MessageSource relies on ResourceBundle, it faces the same limitation. Consider ReloadableResourceBundleMessageSource for an alternative.
Method Summary | |
void | setBasename(String basename) Set a single basename, following ResourceBundle conventions: It is a fully-qualified classname. |
void | setBasenames(String[] basenames) Set an array of basenames, each following ResourceBundle conventions. |
String | toString() Show the configuration of this MessageSource. |
Methods inherited from class org.springframework.context.support.AbstractNestingMessageSource |
getMessage, getMessage, getMessage, setParent, setUseCodeAsDefaultMessage |
Method Detail |
public void setBasename(String basename)
Messages will normally be held in the /lib or /classes directory of a WAR. They can also be held in Jars on the class path. For example, a Jar in an application's manifest classpath could contain messages for the application.
public void setBasenames(String[] basenames)
Note that message definitions in a previous resource bundle will override ones in a later bundle, due to the sequential lookup.
public String toString()
Association Links |
to Class java.util.Map
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |