@Primary public final class CompositeMessageSource extends AbstractMessageSource
AbstractMessageSource.MessageKey
MessageSource.MessageContext
EMPTY
Constructor and Description |
---|
CompositeMessageSource(java.util.Collection<MessageSource> messageSources)
The other messages sources.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getRawMessage(java.lang.String code,
MessageSource.MessageContext context)
Resolve a message for the given code and context.
|
interpolate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessage, getMessage, getRawMessage, getRequiredMessage, getRequiredRawMessage
public CompositeMessageSource(@Nullable java.util.Collection<MessageSource> messageSources)
messageSources
- The message sources.@NonNull public java.util.Optional<java.lang.String> getRawMessage(@NonNull java.lang.String code, @NonNull MessageSource.MessageContext context)
MessageSource
code
- The codecontext
- The context