接口的使用
org.springframework.validation.SmartValidator
使用SmartValidator的程序包 程序包 说明 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.org.springframework.validation.beanvalidation中SmartValidator的使用
实现SmartValidator的org.springframework.validation.beanvalidation中的类 修饰符和类型 类 说明 class
CustomValidatorBean
Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the SpringValidator
interface.class
LocalValidatorFactoryBean
This is the central class forjavax.validation
(JSR-303) setup in a Spring application context: It bootstraps ajavax.validation.ValidationFactory
and exposes it through the SpringValidator
interface as well as through the JSR-303Validator
interface and theValidatorFactory
interface itself.class
OptionalValidatorFactoryBean
LocalValidatorFactoryBean
subclass that simply turnsValidator
calls into no-ops in case of no Bean Validation provider being available.class
SpringValidatorAdapter
Adapter that takes a JSR-303javax.validator.Validator
and exposes it as a SpringValidator
while also exposing the original JSR-303 Validator interface itself.