use of org.springframework.boot.validation.MessageInterpolatorFactory in project spring-boot by spring-projects.
the class SpringValidator method create.
private static Validator create() {
OptionalValidatorFactoryBean validator = new OptionalValidatorFactoryBean();
validator.setMessageInterpolator(new MessageInterpolatorFactory().getObject());
return wrap(validator, false);
}
use of org.springframework.boot.validation.MessageInterpolatorFactory in project spring-boot by spring-projects.
the class ValidationAutoConfiguration method jsr303Validator.
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
@ConditionalOnMissingBean
public static Validator jsr303Validator() {
LocalValidatorFactoryBean factoryBean = new LocalValidatorFactoryBean();
MessageInterpolatorFactory interpolatorFactory = new MessageInterpolatorFactory();
factoryBean.setMessageInterpolator(interpolatorFactory.getObject());
return factoryBean;
}
Aggregations