Package org.springframework.validation.beanvalidation
@NonNullApi
@NonNullFields
package 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.
-
ClassDescriptionSimple
BeanPostProcessor
that 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).Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the SpringValidator
interface.Delegates to a targetMessageInterpolator
implementation but enforces Spring's managed Locale.This is the central class forjakarta.validation
(JSR-303) setup in a Spring application context: It bootstraps ajakarta.validation.ValidationFactory
and exposes it through the SpringValidator
interface as well as through the JSR-303Validator
interface and theValidatorFactory
interface itself.Implementation of Hibernate Validator 4.3/5.x'sResourceBundleLocator
interface, exposing a SpringMessageSource
as localizedMessageSourceResourceBundle
.MethodValidator
that uses a Bean ValidationValidator
for validation, and adaptsConstraintViolation
s toMethodValidationResult
.Strategy to resolve the name of an@Valid
method parameter to use for itsBindingResult
.An AOP AllianceMethodInterceptor
implementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.A convenientBeanPostProcessor
implementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.LocalValidatorFactoryBean
subclass that simply turnsValidator
calls into no-ops in case of no Bean Validation provider being available.JSR-303ConstraintValidatorFactory
implementation that delegates to a Spring BeanFactory for creating autowiredConstraintValidator
instances.Adapter that takes a JSR-303javax.validator.Validator
and exposes it as a SpringValidator
while also exposing the original JSR-303 Validator interface itself.