public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(new MappingJacksonHttpMessageConverter());
}
public Validator getValidator() {
LocalValidatorFactoryBean factory = new LocalValidatorFactoryBean();
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasename("/WEB-INF/messages/validation");
if (environment.acceptsProfiles("embedded")) {
messageSource.setCacheSeconds(0);
}
factory.setValidationMessageSource(messageSource);
return factory;
}