程序包 org.springframework.validation.beanvalidation
Support classes for integrating a JSR-303 Bean Validation provider (such as Hibernate Validator) into a Spring ApplicationContext and in particular with Spring's data binding and validation APIs.
The central class is LocalValidatorFactoryBean which defines a shared ValidatorFactory/Validator setup for availability to other Spring components.
类概要 类 说明 BeanValidationPostProcessor SimpleBeanPostProcessorthat checks JSR-303 constraint annotations in Spring-managed beans, throwing an initialization exception in case of constraint violations right before calling the bean's init method (if any).CustomValidatorBean Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the SpringValidatorinterface.LocaleContextMessageInterpolator Delegates to a targetMessageInterpolatorimplementation but enforces Spring's managed Locale.LocalValidatorFactoryBean This is the central class forjavax.validation(JSR-303) setup in a Spring application context: It bootstraps ajavax.validation.ValidationFactoryand exposes it through the SpringValidatorinterface as well as through the JSR-303Validatorinterface and theValidatorFactoryinterface itself.MessageSourceResourceBundleLocator Implementation of Hibernate Validator 4.3/5.x'sResourceBundleLocatorinterface, exposing a SpringMessageSourceas localizedMessageSourceResourceBundle.MethodValidationInterceptor An AOP AllianceMethodInterceptorimplementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.MethodValidationPostProcessor A convenientBeanPostProcessorimplementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.OptionalValidatorFactoryBean LocalValidatorFactoryBeansubclass that simply turnsValidatorcalls into no-ops in case of no Bean Validation provider being available.SpringConstraintValidatorFactory JSR-303ConstraintValidatorFactoryimplementation that delegates to a Spring BeanFactory for creating autowiredConstraintValidatorinstances.SpringValidatorAdapter Adapter that takes a JSR-303javax.validator.Validatorand exposes it as a SpringValidatorwhile also exposing the original JSR-303 Validator interface itself.