public class CustomValidatorBean extends SpringValidatorAdapter implements Validator, InitializingBean
Validator
interface.Constructor and Description |
---|
CustomValidatorBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Invoked by the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware , ApplicationContextAware etc. |
void |
setMessageInterpolator(MessageInterpolator messageInterpolator)
Specify a custom MessageInterpolator to use for this Validator.
|
void |
setTraversableResolver(TraversableResolver traversableResolver)
Specify a custom TraversableResolver to use for this Validator.
|
void |
setValidatorFactory(ValidatorFactory validatorFactory)
Set the ValidatorFactory to obtain the target Validator from.
|
determineErrorCode, determineField, forExecutables, getArgumentsForConstraint, getConstraintsForClass, getRejectedValue, getResolvableField, processConstraintViolations, supports, unwrap, validate, validate, validate, validateProperty, validateValue, validateValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forExecutables, getConstraintsForClass, unwrap, validate, validateProperty, validateValue
public void setValidatorFactory(ValidatorFactory validatorFactory)
Default is Validation.buildDefaultValidatorFactory()
.
public void setMessageInterpolator(MessageInterpolator messageInterpolator)
public void setTraversableResolver(TraversableResolver traversableResolver)
public void afterPropertiesSet()
InitializingBean
BeanFactory
after it has set all bean properties
and satisfied BeanFactoryAware
, ApplicationContextAware
etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet
in interface InitializingBean