public class CustomValidatorBean extends SpringValidatorAdapter implements Validator, InitializingBean
Validator
interface.Constructor and Description |
---|
CustomValidatorBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
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, getArgumentsForConstraint, getConstraintsForClass, getRejectedValue, processConstraintViolations, supports, unwrap, validate, validate, validate, validateProperty, validateValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean