org.springframework.validation.beanvalidation

## 类 SpringConstraintValidatorFactory

- java.lang.Object
- - org.springframework.validation.beanvalidation.SpringConstraintValidatorFactory

- 所有已实现的接口:
    ConstraintValidatorFactory

      public class SpringConstraintValidatorFactory
      extends Object
      implements ConstraintValidatorFactory

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

  Note that this class is meant for programmatic use, not for declarative use in a standard `validation.xml` file. Consider `org.springframework.web.bind.support.SpringWebConstraintValidatorFactory` for declarative use in a web application, e.g. with JAX-RS or JAX-WS.

  从以下版本开始:
    3.0
  作者:
    Juergen Hoeller
  另请参阅:
    `AutowireCapableBeanFactory.createBean(Class)`, `ApplicationContext.getAutowireCapableBeanFactory()`

- - ### 构造器概要

    构造器
    构造器和说明
    `SpringConstraintValidatorFactory(org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory)` Create a new SpringConstraintValidatorFactory for the given BeanFactory.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `<T extends ConstraintValidator<?,?>> T` | `getInstance(Class<T> key)`
    `void` | `releaseInstance(ConstraintValidator<?,?> instance)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### SpringConstraintValidatorFactory

          public SpringConstraintValidatorFactory(org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory)

      Create a new SpringConstraintValidatorFactory for the given BeanFactory.
      参数:
        `beanFactory` - the target BeanFactory

  - ### 方法详细资料

    - #### getInstance

          public <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key)

      指定者:
        `getInstance` 在接口中 `ConstraintValidatorFactory`

    - #### releaseInstance

          public void releaseInstance(ConstraintValidator<?,?> instance)

      指定者:
        `releaseInstance` 在接口中 `ConstraintValidatorFactory`