Class ValidationAutoConfiguration
java.lang.Object
org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration
@Configuration(proxyBeanMethods=false)
@ConditionalOnClass(jakarta.validation.executable.ExecutableValidator.class)
@ConditionalOnResource(resources="classpath:META-INF/services/jakarta.validation.spi.ValidationProvider")
@Import(org.springframework.boot.autoconfigure.validation.PrimaryDefaultValidatorPostProcessor.class)
public class ValidationAutoConfiguration
extends Object
Auto-configuration
to configure the validation
infrastructure.- Since:
- 1.5.0
- Author:
- Stephane Nicoll, Madhura Bhave
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalValidatorFactoryBean
defaultValidator
(ApplicationContext applicationContext) methodValidationPostProcessor
(Environment environment, Validator validator, ObjectProvider<MethodValidationExcludeFilter> excludeFilters)
-
Constructor Details
-
ValidationAutoConfiguration
public ValidationAutoConfiguration()
-
-
Method Details
-
defaultValidator
@Bean @Role(2) @ConditionalOnMissingBean(jakarta.validation.Validator.class) public static LocalValidatorFactoryBean defaultValidator(ApplicationContext applicationContext) -
methodValidationPostProcessor
@Bean @ConditionalOnMissingBean(search=CURRENT) public static MethodValidationPostProcessor methodValidationPostProcessor(Environment environment, @Lazy Validator validator, ObjectProvider<MethodValidationExcludeFilter> excludeFilters)
-