Skip to content

Instantly share code, notes, and snippets.

@andy221166
Created April 7, 2018 10:15
Show Gist options
  • Save andy221166/806ea2c9205c3630c87b6172dcd1fa29 to your computer and use it in GitHub Desktop.
Save andy221166/806ea2c9205c3630c87b6172dcd1fa29 to your computer and use it in GitHub Desktop.
/**
* This configuration helps support for load javax/hibernate validator message by custom key
*
* @return
*/
@Bean
public Validator validator() {
final LocalValidatorFactoryBean factory = new LocalValidatorFactoryBean();
factory.setValidationMessageSource(messageSource());
return factory;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment