package com.qianwen.smartman.common.validator.flag; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; @Target({ElementType.FIELD, ElementType.PARAMETER}) @Constraint(validatedBy = {FlagValueValidator.class}) @Documented @Retention(RetentionPolicy.RUNTIME) public @interface FlagValue { @Target({ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface List { FlagValue[] value(); } String message() default "不正确的flag标识,请传递Y或者N"; Class[] groups() default {}; Class[] payload() default {}; boolean required() default true; }