カスタム検証アノテーションを書いています。これには、@interface アノテーションの作成と ConstraintValidator の実装が含まれます。たとえば、@interface は次のように定義できます。
@Target( { METHOD, FIELD, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Constraint(validatedBy = MyConstraintValidator.class)
@Documented
public @interface MyAnnotation {
String message() default "{my.error.message}";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
「validatedBy」宣言なしでこのスタイルの定義を使用し、代わりに @interface と ContraintValidator 実装の間のマッピングを spring beans.xml ファイルで定義することは可能ですか?