org.springframework.validation.beanvalidation

## Class SpringConstraintValidatorFactory

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

- All Implemented Interfaces:
    ConstraintValidatorFactory

      public class SpringConstraintValidatorFactory
      extends Object
      implements ConstraintValidatorFactory

  JSR-303 `ConstraintValidatorFactory` implementation that delegates to a Spring BeanFactory for creating autowired `ConstraintValidator` instances.
  Since:
    3.0
  Author:
    Juergen Hoeller
  See Also:
    `AutowireCapableBeanFactory.createBean(Class)`, `ApplicationContext.getAutowireCapableBeanFactory()`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)` Create a new SpringConstraintValidatorFactory for the given BeanFactory.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends ConstraintValidator<?,?>> T` | `getInstance(Class<T> key)`
    `void` | `releaseInstance(ConstraintValidator<?,?> instance)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### SpringConstraintValidatorFactory

          public SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)

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

  - ### Method Detail

    - #### getInstance

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

      Specified by:
        `getInstance` in interface `ConstraintValidatorFactory`

    - #### releaseInstance

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