Search in sources :

Example 1 with MethodValidationPostProcessor

use of org.springframework.validation.beanvalidation.MethodValidationPostProcessor in project spring-boot by spring-projects.

the class ValidationAutoConfiguration method methodValidationPostProcessor.

@Bean
@ConditionalOnMissingBean
public static MethodValidationPostProcessor methodValidationPostProcessor(Validator validator) {
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    processor.setProxyTargetClass(true);
    processor.setValidator(validator);
    return processor;
}
Also used : MethodValidationPostProcessor(org.springframework.validation.beanvalidation.MethodValidationPostProcessor) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)

Example 2 with MethodValidationPostProcessor

use of org.springframework.validation.beanvalidation.MethodValidationPostProcessor in project av-service by dvoraka.

the class SpringWebConfig method methodValidationPostProcessor.

@Bean
public MethodValidationPostProcessor methodValidationPostProcessor(Validator validator) {
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    processor.setValidator(validator);
    return processor;
}
Also used : MethodValidationPostProcessor(org.springframework.validation.beanvalidation.MethodValidationPostProcessor) Bean(org.springframework.context.annotation.Bean) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)

Example 3 with MethodValidationPostProcessor

use of org.springframework.validation.beanvalidation.MethodValidationPostProcessor in project xm-ms-entity by xm-online.

the class ValidationConfig method methodValidationPostProcessor.

@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    final MethodValidationPostProcessor methodValidationPostProcessor = new MethodValidationPostProcessor();
    methodValidationPostProcessor.setValidator(validator());
    return methodValidationPostProcessor;
}
Also used : MethodValidationPostProcessor(org.springframework.validation.beanvalidation.MethodValidationPostProcessor) Bean(org.springframework.context.annotation.Bean) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)

Example 4 with MethodValidationPostProcessor

use of org.springframework.validation.beanvalidation.MethodValidationPostProcessor in project mica2 by obiba.

the class ValidationConfiguration method methodValidationPostProcessor.

@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
    MethodValidationPostProcessor processor = new MethodValidationPostProcessor();
    processor.setValidator(validator());
    return processor;
}
Also used : MethodValidationPostProcessor(org.springframework.validation.beanvalidation.MethodValidationPostProcessor) Bean(org.springframework.context.annotation.Bean) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)

Aggregations

Bean (org.springframework.context.annotation.Bean)4 LocalValidatorFactoryBean (org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)4 MethodValidationPostProcessor (org.springframework.validation.beanvalidation.MethodValidationPostProcessor)4 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1