abstract class MessageSourceSupport
Base class for message source implementations, providing support infrastructure such as java.text.MessageFormat handling but not implementing concrete methods defined in the org.springframework.context.MessageSource.
AbstractMessageSource derives from this class, providing concrete getMessage implementations that delegate to a central template method for message code resolution.
Author
Juergen Hoeller
Since
2.5.5
MessageSourceSupport()
Base class for message source implementations, providing support infrastructure such as java.text.MessageFormat handling but not implementing concrete methods defined in the org.springframework.context.MessageSource. AbstractMessageSource derives from this class, providing concrete |
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. |
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. |