一个注解搞定SpringBoot接口定制属性加解密

Java84

前言

上个月公司另一个团队做的新项目上线后大体上运行稳定,但包括研发负责人在内的两个人在项目上线后立马就跳槽了,然后又交接给了我这个「垃圾回收人员」。
本周,甲方另一家制造商的监控平台扫描了我们项目的一些未加密接口的敏感信息,并要求我们立即处理。

[En]

This week, the monitoring platform of another manufacturer of Party A scanned some sensitive information of some interfaces of our project that was not encrypted, and asked us to deal with it immediately.

经过检查,我发现这是真的。手机、身份证号码和其他东西都没有脱敏。突然,一万只神圣的野兽在我心中奔跑。

[En]

After checking, I found that it was true. The mobile phone, ID number number and other things were not desensitized. Suddenly, ten thousand divine beasts were running in my heart.

幸运的是,我在处理此类紧急情况方面有很长的经验。我直接编写了一个自定义注释,然后将其添加到需要加密和解密的接口中。经过与前端的联合调试,Ouke解决了这个问题。在那之后,我保持着沉重的脸,但我的心平静而可疑。

[En]

Fortunately, I have long experience in dealing with such emergencies. I wrote a custom annotation directly, and then added it to the interface that needs encryption and decryption. After a joint debugging with the front end, Ouke solved the problem. After that, I kept my face heavy, but my heart was calm and fishy.

在钓鱼的空闲时间,我将简化实现方法,并以最容易理解的方式与大家分享。你可以收集它。当你需要它的时候,你可以把它捞出来,以节省一些思考的时间。

[En]

In the free time of fishing, I will simplify the implementation method and share it in the most understandable way. You can collect it. When you need it, you can fish it out to save some time for thinking.

技术版本

一个注解搞定SpringBoot接口定制属性加解密

实现过程

1、引入依赖

一个注解搞定SpringBoot接口定制属性加解密

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长