diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java index a2eddf9fca..404af2eb02 100644 --- a/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java @@ -48,7 +48,7 @@ public abstract class AbstractResourceBasedMessageSource extends AbstractMessage * Set a single basename, following the basic ResourceBundle convention * of not specifying file extension or language codes. The resource location * format is up to the specific {@code MessageSource} implementation. - *
Regular and XMl properties files are supported: .g. "messages" will find + *
Regular and XMl properties files are supported: e.g. "messages" will find * a "messages.properties", "messages_en.properties" etc arrangement as well * as "messages.xml", "messages_en.xml" etc. * @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 * of not specifying file extension or language codes. The resource location * format is up to the specific {@code MessageSource} implementation. - *
Regular and XMl properties files are supported: .g. "messages" will find + *
Regular and XMl properties files are supported: e.g. "messages" will find * a "messages.properties", "messages_en.properties" etc arrangement as well * as "messages.xml", "messages_en.xml" etc. *
The associated resource bundles will be checked sequentially when resolving @@ -138,7 +138,7 @@ public abstract class AbstractResourceBasedMessageSource extends AbstractMessage *
Falling back to the system Locale is the default behavior of * {@code java.util.ResourceBundle}. However, this is often not desirable * 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) { this.fallbackToSystemLocale = fallbackToSystemLocale; diff --git a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java index 8f4e182606..92fecb1a78 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java @@ -57,14 +57,14 @@ import org.springframework.util.StringUtils; * prefix, resources can still be loaded from the classpath, but "cacheSeconds" values * other than "-1" (caching forever) might not work reliably in this case. * - *
For a typical web application, message files could be placed into {@code WEB-INF}: - * e.g. a "WEB-INF/messages" basename would fine a "WEB-INF/messages.properties", + *
For a typical web application, message files could be placed in {@code WEB-INF}: + * 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.xml" etc. Note that message definitions in a previous * resource bundle will override ones in a later bundle, due to sequential lookup. *
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, * simply getting overridden with the ApplicationContext's resource loader * if running in a context. It does not have any other specific dependencies. @@ -117,7 +117,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractResourceBased *
Only applies to classic properties files, not to XML files. * @param fileEncodings Properties with filenames as keys and charset * 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". * @see #setBasenames * @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 * other threads keep returning the old properties for the time being, until * the refresh attempt has completed. - *
Default is "true": This behavior is new as of Spring Framework 4.1, + *
Default is "true": this behavior is new as of Spring Framework 4.1, * minimizing contention between threads. If you prefer the old behavior, * i.e. to fully block on refresh, switch this flag to "false". * @since 4.1