docs: 注释优化

This commit is contained in:
Ray.Hao
2024-12-25 22:39:07 +08:00
parent eaf03138b9
commit 38469fefe5
7 changed files with 24 additions and 24 deletions

View File

@@ -1,19 +1,26 @@
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.*;
/**
* 用于验证字段值是否合法的注解
*
* @author Ray.Hao
* @since 2.18.0
*/
@Documented
@Constraint(validatedBy = FieldValidator.class)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidField {
/**
* 验证失败时的错误信息。
*/
String message() default "非法字段";
Class<?>[] groups() default {};
@@ -21,7 +28,7 @@ public @interface ValidField {
Class<? extends Payload>[] payload() default {};
/**
* 允许的字段值
* 允许的合法值列表。
*/
String[] allowedValues();

View File

@@ -5,7 +5,7 @@ import com.alibaba.excel.event.AnalysisEventListener;
/**
* 自定义解析结果监听器
*
* @author haoxr
* @author Ray.Hao
* @since 2023/03/01
*/
public abstract class BaseAnalysisEventListener<T> extends AnalysisEventListener<T> {

View File

@@ -1,9 +1,9 @@
package com.youlai.boot.common.constant;
/**
* 缓存常量
* 安全模块常量
*
* @author haoxr
* @author Ray.Hao
* @since 2023/11/24
*/
public interface SecurityConstants {
@@ -23,25 +23,18 @@ public interface SecurityConstants {
*/
String BLACKLIST_TOKEN_PREFIX = "token:blacklist:";
/**
* 登录路径
*/
String LOGIN_PATH = "/api/v1/auth/login";
/**
* JWT Token 前缀
*/
String JWT_TOKEN_PREFIX = "Bearer ";
/**
* 微信登录路径
*/
String WECHAT_LOGIN_PATH = "/api/v1/auth/wechat-login";
/**
* 角色前缀 Spring Security 的 authorities 角色前缀,用于区分角色和权限
* 角色前缀,用于区分 authorities 角色和权限, ROLE_* 角色 、没有前缀的是权限
*/
String ROLE_PREFIX = "ROLE_";
}

View File

@@ -15,7 +15,7 @@ import java.nio.charset.StandardCharsets;
/**
* 响应工具类
*
* @author Ray Hao
* @author Ray.Hao
* @since 2.0.0
*/
@Slf4j