Class SpringConstraintValidatorFactory
java.lang.Object
org.springframework.validation.beanvalidation.SpringConstraintValidatorFactory
- All Implemented Interfaces:
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
SpringWebConstraintValidatorFactory
for declarative use in a web application, e.g. with JAX-RS or JAX-WS.
- Since:
- 3.0
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a new SpringConstraintValidatorFactory for the given BeanFactory. -
Method Summary
Modifier and TypeMethodDescription<T extends ConstraintValidator<?,
?>>
TgetInstance
(Class<T> key) void
releaseInstance
(ConstraintValidator<?, ?> instance)
-
Constructor Details
-
SpringConstraintValidatorFactory
Create a new SpringConstraintValidatorFactory for the given BeanFactory.- Parameters:
beanFactory
- the target BeanFactory
-
-
Method Details
-
getInstance
- Specified by:
getInstance
in interfaceConstraintValidatorFactory
-
releaseInstance
- Specified by:
releaseInstance
in interfaceConstraintValidatorFactory
-