@Primary public final class CompositeMessageSource extends AbstractMessageSource
AbstractMessageSource.MessageKey
MessageSource.MessageContext
EMPTY
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
CompositeMessageSource(Collection<MessageSource> messageSources)
The other messages sources.
|
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getRawMessage(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, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getRawMessage, getRequiredMessage, getRequiredRawMessage
public CompositeMessageSource(@Nullable Collection<MessageSource> messageSources)
messageSources
- The message sources.@NonNull public Optional<String> getRawMessage(@NonNull String code, @NonNull MessageSource.MessageContext context)
MessageSource
code
- The codecontext
- The context