org.springframework.boot.validation.MessageInterpolatorFactory Java Examples

The following examples show how to use org.springframework.boot.validation.MessageInterpolatorFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ValidatorTests.java    From spring-graalvm-native with Apache License 2.0 5 votes vote down vote up
private Validator createValidator() {
	LocalValidatorFactoryBean localValidatorFactoryBean = new LocalValidatorFactoryBean();
	localValidatorFactoryBean
			.setMessageInterpolator(new MessageInterpolatorFactory().getObject());
	localValidatorFactoryBean.afterPropertiesSet();
	return localValidatorFactoryBean;
}
 
Example #2
Source File: ConfigurationServiceTests.java    From spring-cloud-gateway with Apache License 2.0 5 votes vote down vote up
LocalValidatorFactoryBean getValidator() {
	GenericApplicationContext context = new GenericApplicationContext();
	context.refresh();
	LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean();
	validator.setApplicationContext(context);
	validator.setMessageInterpolator(new MessageInterpolatorFactory().getObject());
	validator.afterPropertiesSet();
	return validator;
}
 
Example #3
Source File: ConfigurationPropertiesJsr303Validator.java    From spring-cloud-gray with Apache License 2.0 4 votes vote down vote up
Delegate(ApplicationContext applicationContext) {
    setApplicationContext(applicationContext);
    setMessageInterpolator(new MessageInterpolatorFactory().getObject());
    afterPropertiesSet();
}