Class CustomValidatorBean

java.lang.Object
org.springframework.validation.beanvalidation.SpringValidatorAdapter
org.springframework.validation.beanvalidation.CustomValidatorBean
All Implemented Interfaces:
Validator, org.springframework.beans.factory.InitializingBean, SmartValidator, Validator

public class CustomValidatorBean extends SpringValidatorAdapter implements Validator, org.springframework.beans.factory.InitializingBean
Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the Spring Validator interface.
Since:
3.0
Author:
Juergen Hoeller
  • Constructor Details

    • CustomValidatorBean

      public CustomValidatorBean()
  • Method Details

    • setValidatorFactory

      public void setValidatorFactory(ValidatorFactory validatorFactory)
      Set the ValidatorFactory to obtain the target Validator from.

      Default is Validation.buildDefaultValidatorFactory().

    • setMessageInterpolator

      public void setMessageInterpolator(MessageInterpolator messageInterpolator)
      Specify a custom MessageInterpolator to use for this Validator.
    • setTraversableResolver

      public void setTraversableResolver(TraversableResolver traversableResolver)
      Specify a custom TraversableResolver to use for this Validator.
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean