refactor: 调整注解路径至common包下
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.youlai.boot.common.annotation;
|
||||
|
||||
|
||||
import com.youlai.boot.core.validator.FieldValidator;
|
||||
import jakarta.validation.Constraint;
|
||||
import jakarta.validation.Payload;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Documented
|
||||
@Constraint(validatedBy = FieldValidator.class)
|
||||
@Target({ElementType.FIELD, ElementType.PARAMETER})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface ValidField {
|
||||
|
||||
|
||||
String message() default "非法字段";
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
/**
|
||||
* 允许的字段值
|
||||
*/
|
||||
String[] allowedValues();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user