新增bean参数检查和list中bean参数检查注解

This commit is contained in:
wanggeng 2021-08-19 14:49:43 +08:00
parent a78907a2bb
commit 5c0aa99035
7 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package ink.wgink.annotation;
import java.lang.annotation.*;
/**
* @ClassName: CheckObjectAnnotation
* @Description: 检查对象注解标记的对象可递归检查属性
* @Author: wanggeng
* @Date: 2021/8/19 2:14 下午
* @Version: 1.0
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
public @interface CheckBeanAnnotation {
}

View File

@ -14,5 +14,9 @@ public @interface CheckBooleanAnnotation {
String name();
String value() default "";
String description() default "";
String[] types() default {};
}

View File

@ -19,6 +19,10 @@ public @interface CheckEmptyAnnotation {
String name();
String value() default "";
String description() default "";
String[] types() default {};
String verifyType() default "";

View File

@ -19,4 +19,8 @@ public @interface CheckListAnnotation {
String name();
String value() default "";
String description() default "";
}

View File

@ -0,0 +1,16 @@
package ink.wgink.annotation;
import java.lang.annotation.*;
/**
* @ClassName: CheckListObjectAnnotation
* @Description: 检查列表对象注解标记的列表可递检查属性
* @Author: wanggeng
* @Date: 2021/8/19 2:15 下午
* @Version: 1.0
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
public @interface CheckListBeanAnnotation {
}

View File

@ -19,5 +19,9 @@ public @interface CheckNullAnnotation {
String name();
String value() default "";
String description() default "";
String[] types() default {};
}

View File

@ -19,6 +19,10 @@ public @interface CheckNumberAnnotation {
String name();
String value() default "";
String description() default "";
String[] types() default {};
double max() default Integer.MAX_VALUE;