public class SpringConstraintValidatorFactory extends Object implements ConstraintValidatorFactory
ConstraintValidatorFactory
implementation that delegates to a
Spring BeanFactory for creating autowired ConstraintValidator
instances.AutowireCapableBeanFactory.createBean(Class)
,
ApplicationContext.getAutowireCapableBeanFactory()
Constructor and Description |
---|
SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)
Create a new SpringConstraintValidatorFactory for the given BeanFactory.
|
public SpringConstraintValidatorFactory(AutowireCapableBeanFactory beanFactory)
beanFactory
- the target BeanFactorypublic <T extends ConstraintValidator<?,?>> T getInstance(Class<T> key)
getInstance
in interface ConstraintValidatorFactory