spring-framework / org.springframework.context.support / StaticMessageSource

StaticMessageSource

open class StaticMessageSource : AbstractMessageSource

Simple implementation of org.springframework.context.MessageSource which allows messages to be registered programmatically. This MessageSource supports basic internationalization.

Intended for testing rather than for use in production systems.

Author
Rod Johnson

Author
Juergen Hoeller

Constructors

<init>

StaticMessageSource()

Simple implementation of org.springframework.context.MessageSource which allows messages to be registered programmatically. This MessageSource supports basic internationalization.

Intended for testing rather than for use in production systems.

Functions

addMessage

open fun addMessage(code: String, locale: Locale, msg: String): Unit

Associate the given message with the given code.

addMessages

open fun addMessages(messages: MutableMap<String, String>, locale: Locale): Unit

Associate the given message values with the given keys as codes.

toString

open fun toString(): String