update README.md.
parent
aceb32973c
commit
07fd808ac4
|
@ -15,7 +15,7 @@
|
|||
|
||||
#### 三、快速入门
|
||||
|
||||
1. 添加依赖
|
||||
##### 1. 添加依赖
|
||||
```
|
||||
<dependency>
|
||||
<groupId>io.github.applesline</groupId>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
2. 打开脱敏开关 @EnableDesensitize
|
||||
##### 2. 打开脱敏开关 @EnableDesensitize
|
||||
```
|
||||
import org.applesline.desensitize.annotation.EnableDesensitize;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
|
@ -39,7 +39,7 @@ public class DemoApplication {
|
|||
}
|
||||
|
||||
```
|
||||
3. 针对方法的局部脱敏 @Desensitize
|
||||
##### 3. 针对方法的局部脱敏 @Desensitize
|
||||
```
|
||||
@RequestMapping("queryResult")
|
||||
@Desensitize(fieldMapping = @FieldMapping(fields = {"_mobile"},type = DesensitizeType.MOBILE))
|
||||
|
@ -48,7 +48,7 @@ public class DemoApplication {
|
|||
}
|
||||
```
|
||||
|
||||
4. 脱敏效果展示(响应体中的_mobile字段被脱敏了)
|
||||
##### 4. 脱敏效果展示(响应体中的_mobile字段被脱敏了)
|
||||
```
|
||||
{
|
||||
"_email": "123456789@163.com",
|
||||
|
|
Loading…
Reference in New Issue