Code example for ConfigurableWebBindingInitializer

Methods: setValidator

0
 
public abstract class ConfigSupport { 
 
	@Bean 
	public WebBindingInitializer initializer() { 
		ConfigurableWebBindingInitializer initializer = new ConfigurableWebBindingInitializer(); 
		initializer.setValidator(mvcValidator()); 
		return initializer; 
	} 
	 
	@Bean 
	Validator mvcValidator() { 
		return new LocalValidatorFactoryBean(); 
	} 
	 
	 
}