Springboot 配置文件、隐私数据脱敏的最佳实践(二)
紧接着测试一下切面注解的效果,我们对字段mobile、address加上注解EncryptField做脱敏处理。EncryptMethodPostMapping(value"test")ResponseBodypublicObjecttestEncrypt(RequestBodyUserVouser,EncryptFieldStringname){returninsertUser(user,name);}privateUserVoinsertUser(UserVouser,Stringname){System.out.println("加密后的数据:user"+JSON.toJSONString(user));returnuser;}DatapublicclassUserVoimplementsSeriali...