{
Class<? extends MessageResolver> messageResolverClass =
ClassUtils.tryToLoadClassForName(messageContextConfig.messageResolver().getName());
messageContext.messageResolver(
BeanProvider.getContextualReference(messageResolverClass, new AnyLiteral()));
}
if (!MessageInterpolator.class.equals(messageContextConfig.messageInterpolator()))
{
Class<? extends MessageInterpolator> messageInterpolatorClass =
ClassUtils.tryToLoadClassForName(messageContextConfig.messageInterpolator().getName());
messageContext.messageInterpolator(
BeanProvider.getContextualReference(messageInterpolatorClass, new AnyLiteral()));
}
if (!LocaleResolver.class.equals(messageContextConfig.localeResolver()))
{
Class<? extends LocaleResolver> localeResolverClass =
ClassUtils.tryToLoadClassForName(messageContextConfig.localeResolver().getName());
messageContext.localeResolver(
BeanProvider.getContextualReference(localeResolverClass, new AnyLiteral()));
}
String[] messageSources = messageContextConfig.messageSource();
messageContext.messageSource(messageSources);