package cn.com.ty.lift.common.utils; import java.lang.annotation.*; /** *
* 标记需要检验参数 *
* @author wcz * @since 2020/1/27 9:35 */ @Target({ElementType.METHOD,ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Judger { /** * 标注在method上,指定fields,需要校验的对象属性 */ String[] fields() default {}; /** * 标注在field上,指定message,属性值不合法时抛出的异常消息 */ String message() default ""; }