Fix ordering problem with validator being null

pull/1/merge
Dave Syer 12 years ago
parent e24ffa7e64
commit fc8240ac88

@ -56,11 +56,15 @@ public class ConfigurationPropertiesBindingConfiguration {
@Qualifier(VALIDATOR_BEAN_NAME)
private Validator validator;
@Bean
@ConditionalOnMissingBean(name = VALIDATOR_BEAN_NAME)
@ConditionalOnClass(name = "javax.validation.Validator")
protected Validator configurationPropertiesValidator() {
return new LocalValidatorFactoryBean();
public static class ValidatorConfiguration {
@Bean
protected Validator configurationPropertiesValidator() {
return new LocalValidatorFactoryBean();
}
}
/**

Loading…
Cancel
Save