Getting Spring 4 dependency injection working with RESTeasy 3 validator
问题 I have been running into a lot of trouble trying to get custom Bean Validation constraints to successfully leverage Spring's dependency injection. For example I might define a constraint: @Constraint(validatedBy = { CustomConstraintValidator.class }) @Documented @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER }) @Retention(RetentionPolicy.RUNTIME) public @interface CustomConstraint { String message() default "custom.constraint.error"; Class<?>[]