public static ValidatorFactory createValidatorFactory(ValidatorProvider provider) {
    Configuration<?> config = Validation.byDefaultProvider().configure();

    config.constraintValidatorFactory(
        new CustomConstraintValidatorFactory(
            config.getDefaultConstraintValidatorFactory(), provider));

    return config.buildValidatorFactory();
  }
コード例 #2
0
 @Override
 public ConstraintValidatorFactory getDefaultConstraintValidatorFactory() {
   return delegate.getDefaultConstraintValidatorFactory();
 }
コード例 #3
0
 @Override
 public ConstraintValidatorFactory getDefaultConstraintValidatorFactory() {
   return configuration.getDefaultConstraintValidatorFactory();
 }