docs 补充项目注释
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- AOP 切面 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aspectj</artifactId>
|
||||
@@ -51,21 +52,25 @@
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Hutool 核心工具 -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Hutool HTTP 工具 -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-http</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Hutool 扩展工具 -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-extra</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
@@ -77,12 +82,14 @@
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot 配置迁移 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-properties-migrator</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Mapstruct Plus -->
|
||||
<dependency>
|
||||
<groupId>io.github.linpeilie</groupId>
|
||||
<artifactId>mapstruct-plus-spring-boot-starter</artifactId>
|
||||
|
||||
+6
@@ -33,8 +33,14 @@ public @interface DictPattern {
|
||||
*/
|
||||
String message() default "字典值无效";
|
||||
|
||||
/**
|
||||
* Bean Validation 分组。
|
||||
*/
|
||||
Class<?>[] groups() default {};
|
||||
|
||||
/**
|
||||
* Bean Validation 负载信息。
|
||||
*/
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
}
|
||||
|
||||
+16
@@ -32,16 +32,32 @@ public @interface EnumPattern {
|
||||
*/
|
||||
String fieldName();
|
||||
|
||||
/**
|
||||
* 校验失败时返回的错误消息。
|
||||
*/
|
||||
String message() default "输入值不在枚举范围内";
|
||||
|
||||
/**
|
||||
* Bean Validation 分组。
|
||||
*/
|
||||
Class<?>[] groups() default {};
|
||||
|
||||
/**
|
||||
* Bean Validation 负载信息。
|
||||
*/
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
/**
|
||||
* 支持在同一元素上重复声明多个枚举校验规则。
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
|
||||
@Retention(RUNTIME)
|
||||
@interface List {
|
||||
|
||||
/**
|
||||
* 重复声明的枚举校验规则集合。
|
||||
*/
|
||||
EnumPattern[] value();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,19 @@ import java.lang.annotation.Target;
|
||||
@Constraint(validatedBy = {XssValidator.class})
|
||||
public @interface Xss {
|
||||
|
||||
/**
|
||||
* 校验失败时返回的错误消息。
|
||||
*/
|
||||
String message() default "不允许任何脚本运行";
|
||||
|
||||
/**
|
||||
* Bean Validation 分组。
|
||||
*/
|
||||
Class<?>[] groups() default {};
|
||||
|
||||
/**
|
||||
* Bean Validation 负载信息。
|
||||
*/
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user