@Target(value=TYPE) @Retention(value=RUNTIME) @Documented public @interface MessageContextConfig
MessageBundle
.Modifier and Type | Optional Element and Description |
---|---|
Class<? extends LocaleResolver> |
localeResolver
LocaleResolver providing the locale for message template resolution. |
Class<? extends MessageInterpolator> |
messageInterpolator
MessageInterpolator to use for interpolation of placeholders in the resolved text. |
Class<? extends MessageResolver> |
messageResolver
MessageResolver to use for resolution of message templates to message text. |
String[] |
messageSource
Additional message source.
|
public abstract String[] messageSource
Additional message source.
A message source is a lookup hint for the MessageResolver
. For the default MessageResolver this is the
name of the ResourceBundle
.
Example: To use 2 additional ResourceBundles for the lookup, you can configure the MessageContextConfig like this:
@MessageBundle @MessageContextConfig(messageSource = {"mycomp.ErrorMessages","mycomp.BusinessMessages"}) public interface MyCompanyMessages {....
public abstract Class<? extends MessageResolver> messageResolver
MessageResolver
to use for resolution of message templates to message text.MessageResolver
bean or the default markerpublic abstract Class<? extends MessageInterpolator> messageInterpolator
MessageInterpolator
to use for interpolation of placeholders in the resolved text.MessageInterpolator
bean or the default markerpublic abstract Class<? extends LocaleResolver> localeResolver
LocaleResolver
providing the locale for message template resolution.LocaleResolver
bean or the default markerCopyright © 2020 The Apache Software Foundation. All rights reserved.