open class DelegatingMessageSource : MessageSourceSupport, HierarchicalMessageSource
Empty MessageSource that delegates all calls to the parent MessageSource. If no parent is available, it simply won't resolve any message.
Used as placeholder by AbstractApplicationContext, if the context doesn't define its own MessageSource. Not intended for direct use in applications.
Author
Juergen Hoeller
Since
1.1.5
See Also
AbstractApplicationContext
DelegatingMessageSource()
Empty MessageSource that delegates all calls to the parent MessageSource. If no parent is available, it simply won't resolve any message. Used as placeholder by AbstractApplicationContext, if the context doesn't define its own MessageSource. Not intended for direct use in applications. |
open fun getMessage(code: String, args: Array<Any>, defaultMessage: String, locale: Locale): String open fun getMessage(code: String, args: Array<Any>, locale: Locale): String open fun getMessage(resolvable: MessageSourceResolvable, locale: Locale): String |
|
open fun getParentMessageSource(): MessageSource |
|
open fun setParentMessageSource(parent: MessageSource): Unit |
open fun setAlwaysUseMessageFormat(alwaysUseMessageFormat: Boolean): Unit
Set whether to always apply the Default is "false": Messages without arguments are by default returned as-is, without parsing them through MessageFormat. Set this to "true" to enforce MessageFormat for all messages, expecting all message texts to be written with MessageFormat escaping. For example, MessageFormat expects a single quote to be escaped as "''". If your message texts are all written with such escaping, even when not defining argument placeholders, you need to set this flag to "true". Else, only message texts with actual arguments are supposed to be written with MessageFormat escaping. |