Top Description Classes
[default module]

Package org.springframework.validation.beanvalidation

Annotations
@NonNullApi
@NonNullFields
Imports
org.springframework.lang.NonNullApi, .NonNullFields

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 org.springframework.validation.beanvalidation.LocalValidatorFactoryBean which defines a shared ValidatorFactory/Validator setup for availability to other Spring components.

Class Summary

Modifier and TypeClass and Description
pack-priv class
BeanValidationBeanRegistrationAotProcessor

AOT BeanRegistrationAotProcessor that adds additional hints required for ConstraintValidators.

public class
BeanValidationPostProcessor

Simple 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).

public class
CustomValidatorBean

Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the Spring org.springframework.validation.Validator interface.

public class
LocaleContextMessageInterpolator

Delegates to a target MessageInterpolator implementation but enforces Spring's managed Locale.

public class
LocalValidatorFactoryBean

This is the central class for jakarta.validation (JSR-303) setup in a Spring application context: It bootstraps a jakarta.validation.ValidationFactory and exposes it through the Spring org.springframework.validation.Validator interface as well as through the JSR-303 jakarta.validation.Validator interface and the jakarta.validation.ValidatorFactory interface itself.

public class
MessageSourceResourceBundleLocator

Implementation of Hibernate Validator 4.3/5.x's ResourceBundleLocator interface, exposing a Spring MessageSource as localized MessageSourceResourceBundle.

public class
public class
MethodValidationInterceptor

An AOP Alliance MethodInterceptor implementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.

public class
MethodValidationPostProcessor

A convenient BeanPostProcessor implementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.

public class
OptionalValidatorFactoryBean

LocalValidatorFactoryBean subclass that simply turns org.springframework.validation.Validator calls into no-ops in case of no Bean Validation provider being available.

public class
SpringConstraintValidatorFactory

JSR-303 ConstraintValidatorFactory implementation that delegates to a Spring BeanFactory for creating autowired ConstraintValidator instances.

public class
SpringValidatorAdapter

Adapter that takes a JSR-303 javax.validator.Validator and exposes it as a Spring org.springframework.validation.Validator while also exposing the original JSR-303 Validator interface itself.