最终效果
"id":1,
"username":"姚**",
"password":"******",
"userMobile":"188****1345",
"userTel":"03556026586",
"userEmail":"c*******@aliyun.com",
"userBankNo":"6025 **** **** *** 2235",
"idnumber":"140428********0901"
1.导入starter依赖
<dependency>
<groupId>io.gitee.chemors</groupId>
<artifactId>secure-ext-spring-boot-starter</artifactId>
<version>1.0.3-RELEASE</version>
</dependency>
2.创建用户实体类,使用@DesensitizationProp注解实现给数据自动脱敏
![](https://img-blog.csdnimg.cn/img_convert/fd61b9a0df669972176118c7b0dc49e9.png)
3.创建Handler数据访问,使用@Desensitization注解选择需要脱敏的访问路径
![](https://img-blog.csdnimg.cn/img_convert/34f6a3d45a63397368634b22e0547f15.png)
4.最后启动Springboot访问页面,得到数据
![](https://img-blog.csdnimg.cn/img_convert/f29f51ed0dba8cb8dc440d3f9b5b6460.png)
成功实现Starter方式的数据脱敏