com.gccloud.starter.common.validator.module.area.BizCode Maven / Gradle / Ivy
package com.gccloud.starter.common.validator.module.area;
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:32
*/
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = BizCodeValidator.class)
public @interface BizCode {
String message() default "编码必须是数字、字母、下划线组合";
Class>[] groups() default {};
Class extends Payload>[] payload() default {};
}