From 2d3e0bb57617eb8d9df9175bc72819b58fa99f88 Mon Sep 17 00:00:00 2001 From: sin Date: Thu, 23 May 2019 09:36:08 +0800 Subject: [PATCH] =?UTF-8?q?-=20@Target=20=E5=A4=AA=E9=95=BF=EF=BC=8C?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/common/framework/validator/InEnum.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java b/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java index f0533b0e..fc735d6e 100644 --- a/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java +++ b/common/common-framework/src/main/java/cn/iocoder/common/framework/validator/InEnum.java @@ -6,7 +6,14 @@ import javax.validation.Constraint; import javax.validation.Payload; import java.lang.annotation.*; -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE}) +@Target({ + ElementType.METHOD, + ElementType.FIELD, + ElementType.ANNOTATION_TYPE, + ElementType.CONSTRUCTOR, + ElementType.PARAMETER, + ElementType.TYPE_USE +}) @Retention(RetentionPolicy.RUNTIME) @Documented @Constraint( @@ -22,6 +29,7 @@ public @interface InEnum { String message() default "必须在指定范围 {value}"; Class[] groups() default {}; + Class[] payload() default {}; }