Polish Javadoc for resource-based MessageSources
This commit is contained in:
parent
b49235ac59
commit
26edc674ed
|
@ -48,7 +48,7 @@ public abstract class AbstractResourceBasedMessageSource extends AbstractMessage
|
||||||
* Set a single basename, following the basic ResourceBundle convention
|
* Set a single basename, following the basic ResourceBundle convention
|
||||||
* of not specifying file extension or language codes. The resource location
|
* of not specifying file extension or language codes. The resource location
|
||||||
* format is up to the specific {@code MessageSource} implementation.
|
* format is up to the specific {@code MessageSource} implementation.
|
||||||
* <p>Regular and XMl properties files are supported: .g. "messages" will find
|
* <p>Regular and XMl properties files are supported: e.g. "messages" will find
|
||||||
* a "messages.properties", "messages_en.properties" etc arrangement as well
|
* a "messages.properties", "messages_en.properties" etc arrangement as well
|
||||||
* as "messages.xml", "messages_en.xml" etc.
|
* as "messages.xml", "messages_en.xml" etc.
|
||||||
* @param basename the single basename
|
* @param basename the single basename
|
||||||
|
@ -64,7 +64,7 @@ public abstract class AbstractResourceBasedMessageSource extends AbstractMessage
|
||||||
* Set an array of basenames, each following the basic ResourceBundle convention
|
* Set an array of basenames, each following the basic ResourceBundle convention
|
||||||
* of not specifying file extension or language codes. The resource location
|
* of not specifying file extension or language codes. The resource location
|
||||||
* format is up to the specific {@code MessageSource} implementation.
|
* format is up to the specific {@code MessageSource} implementation.
|
||||||
* <p>Regular and XMl properties files are supported: .g. "messages" will find
|
* <p>Regular and XMl properties files are supported: e.g. "messages" will find
|
||||||
* a "messages.properties", "messages_en.properties" etc arrangement as well
|
* a "messages.properties", "messages_en.properties" etc arrangement as well
|
||||||
* as "messages.xml", "messages_en.xml" etc.
|
* as "messages.xml", "messages_en.xml" etc.
|
||||||
* <p>The associated resource bundles will be checked sequentially when resolving
|
* <p>The associated resource bundles will be checked sequentially when resolving
|
||||||
|
@ -138,7 +138,7 @@ public abstract class AbstractResourceBasedMessageSource extends AbstractMessage
|
||||||
* <p>Falling back to the system Locale is the default behavior of
|
* <p>Falling back to the system Locale is the default behavior of
|
||||||
* {@code java.util.ResourceBundle}. However, this is often not desirable
|
* {@code java.util.ResourceBundle}. However, this is often not desirable
|
||||||
* in an application server environment, where the system Locale is not relevant
|
* in an application server environment, where the system Locale is not relevant
|
||||||
* to the application at all: Set this flag to "false" in such a scenario.
|
* to the application at all: set this flag to "false" in such a scenario.
|
||||||
*/
|
*/
|
||||||
public void setFallbackToSystemLocale(boolean fallbackToSystemLocale) {
|
public void setFallbackToSystemLocale(boolean fallbackToSystemLocale) {
|
||||||
this.fallbackToSystemLocale = fallbackToSystemLocale;
|
this.fallbackToSystemLocale = fallbackToSystemLocale;
|
||||||
|
|
|
@ -57,14 +57,14 @@ import org.springframework.util.StringUtils;
|
||||||
* prefix, resources can still be loaded from the classpath, but "cacheSeconds" values
|
* prefix, resources can still be loaded from the classpath, but "cacheSeconds" values
|
||||||
* other than "-1" (caching forever) might not work reliably in this case.
|
* other than "-1" (caching forever) might not work reliably in this case.
|
||||||
*
|
*
|
||||||
* <p>For a typical web application, message files could be placed into {@code WEB-INF}:
|
* <p>For a typical web application, message files could be placed in {@code WEB-INF}:
|
||||||
* e.g. a "WEB-INF/messages" basename would fine a "WEB-INF/messages.properties",
|
* e.g. a "WEB-INF/messages" basename would find a "WEB-INF/messages.properties",
|
||||||
* "WEB-INF/messages_en.properties" etc arrangement as well as "WEB-INF/messages.xml",
|
* "WEB-INF/messages_en.properties" etc arrangement as well as "WEB-INF/messages.xml",
|
||||||
* "WEB-INF/messages_en.xml" etc. Note that message definitions in a <i>previous</i>
|
* "WEB-INF/messages_en.xml" etc. Note that message definitions in a <i>previous</i>
|
||||||
* resource bundle will override ones in a later bundle, due to sequential lookup.
|
* resource bundle will override ones in a later bundle, due to sequential lookup.
|
||||||
|
|
||||||
* <p>This MessageSource can easily be used outside of an
|
* <p>This MessageSource can easily be used outside of an
|
||||||
* {@link org.springframework.context.ApplicationContext}: It will use a
|
* {@link org.springframework.context.ApplicationContext}: it will use a
|
||||||
* {@link org.springframework.core.io.DefaultResourceLoader} as default,
|
* {@link org.springframework.core.io.DefaultResourceLoader} as default,
|
||||||
* simply getting overridden with the ApplicationContext's resource loader
|
* simply getting overridden with the ApplicationContext's resource loader
|
||||||
* if running in a context. It does not have any other specific dependencies.
|
* if running in a context. It does not have any other specific dependencies.
|
||||||
|
@ -117,7 +117,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractResourceBased
|
||||||
* <p>Only applies to classic properties files, not to XML files.
|
* <p>Only applies to classic properties files, not to XML files.
|
||||||
* @param fileEncodings Properties with filenames as keys and charset
|
* @param fileEncodings Properties with filenames as keys and charset
|
||||||
* names as values. Filenames have to match the basename syntax,
|
* names as values. Filenames have to match the basename syntax,
|
||||||
* with optional locale-specific appendices: e.g. "WEB-INF/messages"
|
* with optional locale-specific components: e.g. "WEB-INF/messages"
|
||||||
* or "WEB-INF/messages_en".
|
* or "WEB-INF/messages_en".
|
||||||
* @see #setBasenames
|
* @see #setBasenames
|
||||||
* @see org.springframework.util.PropertiesPersister#load
|
* @see org.springframework.util.PropertiesPersister#load
|
||||||
|
@ -131,7 +131,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractResourceBased
|
||||||
* locked in a refresh attempt for a specific cached properties file whereas
|
* locked in a refresh attempt for a specific cached properties file whereas
|
||||||
* other threads keep returning the old properties for the time being, until
|
* other threads keep returning the old properties for the time being, until
|
||||||
* the refresh attempt has completed.
|
* the refresh attempt has completed.
|
||||||
* <p>Default is "true": This behavior is new as of Spring Framework 4.1,
|
* <p>Default is "true": this behavior is new as of Spring Framework 4.1,
|
||||||
* minimizing contention between threads. If you prefer the old behavior,
|
* minimizing contention between threads. If you prefer the old behavior,
|
||||||
* i.e. to fully block on refresh, switch this flag to "false".
|
* i.e. to fully block on refresh, switch this flag to "false".
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
|
|
Loading…
Reference in New Issue