content: package com.sqmusicplus.v3.config;
  
  
  import javax.validation.Constraint;
  import javax.validation.Payload;
  import java.lang.annotation.Documented;
  import java.lang.annotation.Retention;
  import java.lang.annotation.Target;
  
  import static java.lang.annotation.ElementType.*;
  import static java.lang.annotation.RetentionPolicy.RUNTIME;
  
  /**
   * @Classname EnumValue
   * @Description 枚举校验注解
   * @Version 1.0.0
   * @Date 2022/6/2 17:02
   * @Created by SQ
   */
  @Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})
  @Retention(RUNTIME)
  @Documented
  @Constraint(validatedBy = {EnumValueValidator.class})
  public @interface EnumValue {
  
      // 默认错误消息
      String message() default "必须为指定值";
  
      String[] strValues() default {};
  
      int[] intValues() default {};
  
      // 分组
      Class<?>[] groups() default {};
  
      // 负载
      Class<? extends Payload>[] payload() default {};
  
      // 指定多个时使用
      @Target({FIELD, METHOD, PARAMETER, ANNOTATION_TYPE})
      @Retention(RUNTIME)
      @Documented
      @interface List {
          EnumValue[] value();
      }
  
  }
  