com.gccloud.starter.common.validator.module.role.Code Maven / Gradle / Ivy
package com.gccloud.starter.common.validator.module.role;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author hongyang
* @version 1.0
* @date 2021/10/29 17:38
*/
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CodeValidator.class)
public @interface Code {
String message() default "编码必须是数字、字母、下划线组合";
Class>[] groups() default {};
Class extends Payload>[] payload() default {};
}