1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
@Max(150)
@Min(0)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {})
public @interface JAge {
@OverridesAttribute(constraint = Max.class, name = "message")
@OverridesAttribute(constraint = Min.class, name = "message")
String message() default "年龄超出范围";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
|