public class ResourceBundleMessageSource extends AbstractMessageSource
AbstractMessageSource.MessageKeyMessageSource.MessageContextEMPTYHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description | 
|---|
| ResourceBundleMessageSource(String baseName)Default constructor. | 
| ResourceBundleMessageSource(String baseName,
                           Locale defaultLocale)Default constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Map<AbstractMessageSource.MessageKey,Optional<ResourceBundle>> | buildBundleCache()Build the cache used to store resolved bundles. | 
| protected Map<AbstractMessageSource.MessageKey,Optional<String>> | buildMessageCache()Build the cache used to store resolved messages. | 
| protected ClassLoader | getClassLoader()The class loader to use. | 
| Optional<String> | getRawMessage(String code,
             MessageSource.MessageContext context)Resolve a message for the given code and context. | 
interpolateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getRawMessage, getRequiredMessage, getRequiredRawMessagepublic ResourceBundleMessageSource(@NonNull String baseName)
baseName - The base name of the message bundle@NonNull public Optional<String> getRawMessage(@NonNull String code, @NonNull MessageSource.MessageContext context)
MessageSourcecode - The codecontext - The contextprotected ClassLoader getClassLoader()
@NonNull protected Map<AbstractMessageSource.MessageKey,Optional<String>> buildMessageCache()
@NonNull protected Map<AbstractMessageSource.MessageKey,Optional<ResourceBundle>> buildBundleCache()