程序包 cn.taketoday.validation.beanvalidation
@NonNullApi
@NonNullFields
package cn.taketoday.validation.beanvalidation
Support classes for integrating a JSR-303 Bean Validation provider
(such as Hibernate Validator) into a Framework ApplicationContext
and in particular with Framework's data binding and validation APIs.
The central class is LocalValidatorFactoryBean
which defines a shared ValidatorFactory/Validator setup for availability
to other Framework components.
-
类说明Simple
InitializationBeanPostProcessorthat checks JSR-303 constraint annotations in Framework-managed beans, throwing an initialization exception in case of constraint violations right before calling the bean's init method (if any).JSR-303ConstraintValidatorFactoryimplementation that delegates to a Framework BeanFactory for creating autowiredConstraintValidatorinstances.Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the FrameworkValidatorinterface.CustomMethodValidationPostProcessorthat appliesexclusion filters.Adapter that takes a JSR-303javax.validator.Validatorand exposes it as a FrameworkValidatorwhile also exposing the original JSR-303 Validator interface itself.Delegates to a targetMessageInterpolatorimplementation but enforces Framework's managed Locale.This is the central class forjakarta.validation(JSR-303) setup in a Framework application context: It bootstraps ajakarta.validation.ValidationFactoryand exposes it through the FrameworkValidatorinterface as well as through the JSR-303Validatorinterface and theValidatorFactoryinterface itself.Implementation of Hibernate Validator 4.3/5.x'sResourceBundleLocatorinterface, exposing a FrameworkMessageSourceas localizedMessageSourceResourceBundle.A filter for excluding types from method validation.An AOP AllianceMethodInterceptorimplementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.A convenientBeanPostProcessorimplementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.LocalValidatorFactoryBeansubclass that simply turnsValidatorcalls into no-ops in case of no Bean Validation provider being available.