mirror of
https://gitee.com/beifeng_java/gulimall.git
synced 2025-12-26 07:16:29 +08:00
update doc
This commit is contained in:
parent
53193ab9fd
commit
6fd0685e4b
BIN
docs/images/img202310261805.png
Normal file
BIN
docs/images/img202310261805.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
@ -3889,9 +3889,15 @@ public @interface ListValue {
|
||||
}
|
||||
```
|
||||
|
||||
### 2、编写一个错误消息配置文件
|
||||
|
||||
```agsl
|
||||
io.niceseason.common.valid.ListValue.message=必须提交指定的值
|
||||
```
|
||||
如果出现乱码问题,需要修改idea的文件的编码方式,具体如下:
|
||||

|
||||
|
||||
### 2、编写一个自定义的校验器
|
||||
### 3、编写一个自定义的校验器
|
||||
|
||||
```java
|
||||
|
||||
@ -3918,13 +3924,13 @@ public class ListValueConstraintValidator implements ConstraintValidator<ListVal
|
||||
|
||||
|
||||
|
||||
### 3、关联自定义的校验器和自定义的校验注解
|
||||
### 4、关联自定义的校验器和自定义的校验注解
|
||||
|
||||
```java
|
||||
@Constraint(validatedBy = { ListValueConstraintValidator.class})
|
||||
```
|
||||
|
||||
### 4、使用实例
|
||||
### 5、使用实例
|
||||
|
||||
```java
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user