{"id":2358,"date":"2023-06-27T15:33:04","date_gmt":"2023-06-27T07:33:04","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=2358"},"modified":"2023-06-27T15:33:04","modified_gmt":"2023-06-27T07:33:04","slug":"aopjsaypt%e5%ae%9e%e7%8e%b0%e6%8c%87%e5%ae%9a%e6%95%8f%e6%84%9f%e5%ad%97%e6%ae%b5%e6%95%b0%e6%8d%ae%e8%84%b1%e6%95%8f","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/aopjsaypt%e5%ae%9e%e7%8e%b0%e6%8c%87%e5%ae%9a%e6%95%8f%e6%84%9f%e5%ad%97%e6%ae%b5%e6%95%b0%e6%8d%ae%e8%84%b1%e6%95%8f\/","title":{"rendered":"aop+jsaypt\u5b9e\u73b0\u6307\u5b9a\u654f\u611f\u5b57\u6bb5\u6570\u636e\u8131\u654f"},"content":{"rendered":"<div class='wxsyncmain'>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;\">\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);\">\u5927\u5bb6\u597d\uff0c\u6211\u662f\u4e00\u5b89\uff0c\u4eca\u5929\u804a\u4e00\u4e0bspringboot\u5229\u7528aop+jasypt\u5b9e\u73b0\u5bf9\u4f20\u5165\u654f\u611f\u6570\u636e\u7684\u8131\u654f\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-weight: bold;font-size: 22px;line-height: 1.5em;margin-top: 2.2em;margin-bottom: 35px;\"><span style=\"display: none;\"><\/span><span style=\"display: inline-block;background-image: linear-gradient(rgb(255, 255, 255) 60%, rgb(255, 177, 27) 40%);background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(81, 81, 81);padding: 2px 13px;margin-right: 3px;height: 50%;\">\u524d\u8a00<\/span><span><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);\">\u4e0d\u7ba1\u4ec0\u4e48\u9879\u76ee\uff0c\u603b\u4f1a\u6709\u4e00\u4e9b\u914d\u7f6e\u4fe1\u606f\u6216\u7528\u6237\u540d\u3001\u624b\u673a\u53f7\u7b49\u654f\u611f\u4fe1\u606f\u66b4\u9732\u51fa\u6765\uff0c\u800cjasypt\u53ef\u4ee5\u91c7\u7528\u7b80\u5355\u7684\u65b9\u5f0f\u6765\u89e3\u51b3java\u5f00\u53d1\u4e2d\u7684\u6570\u636e\u8131\u654f\u95ee\u9898 \uff0c\u4e0d\u7ba1\u662f\u9879\u76ee\u4e2d\u914d\u7f6e\u6587\u4ef6\u8fd8\u662f\u7528\u6237\u7684\u654f\u611f\u4fe1\u606f\uff0cjasypt\u90fd\u80fd\u591f\u8f7b\u677e\u7684\u5d4c\u5165\u5176\u4e2d\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-weight: bold;font-size: 22px;line-height: 1.5em;margin-top: 2.2em;margin-bottom: 35px;\"><span style=\"display: none;\"><\/span><span style=\"display: inline-block;background-image: linear-gradient(rgb(255, 255, 255) 60%, rgb(255, 177, 27) 40%);background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(81, 81, 81);padding: 2px 13px;margin-right: 3px;height: 50%;\">\u5f15\u5165jasypt\u4f9d\u8d56<\/span><span><\/span><\/h2>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627152116174.jpeg&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\">@Slf4j<br  \/>@Aspect<br  \/>@Component<br  \/>public&nbsp;class&nbsp;DecryptAspect&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;@Autowired<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;StringEncryptor&nbsp;stringEncryptor;<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;@Pointcut(<span style=\"color: #98c379;line-height: 26px;\">\"@annotation(com.capitek.dataEncryption.annotation.NeedDecrypt)\"<\/span>)<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;void&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: #61aeee;line-height: 26px;\">pointCut<\/span><\/span>()&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;@Around(<span style=\"color: #98c379;line-height: 26px;\">\"pointCut()\"<\/span>)<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;Object&nbsp;around(ProceedingJoinPoint&nbsp;joinPoint)&nbsp;throws&nbsp;Throwable&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u89e3\u5bc6<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object&nbsp;result&nbsp;=&nbsp;decrypt(joinPoint);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">return<\/span>&nbsp;result;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;Object&nbsp;decrypt(ProceedingJoinPoint&nbsp;joinPoint)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object&nbsp;result&nbsp;=&nbsp;null;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object&nbsp;obj&nbsp;=&nbsp;joinPoint.proceed();<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>&nbsp;(obj&nbsp;!=&nbsp;null)&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>&nbsp;(obj&nbsp;instanceof&nbsp;String)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decryptValue(obj);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">else<\/span>&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result&nbsp;=&nbsp;decryptData(obj);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;catch&nbsp;(Throwable&nbsp;e)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">return<\/span>&nbsp;result;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;Object&nbsp;decryptData(Object&nbsp;obj)&nbsp;throws&nbsp;IllegalAccessException&nbsp;{<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>&nbsp;(Objects.isNull(obj))&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">return<\/span>&nbsp;null;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>(obj&nbsp;instanceof&nbsp;ResultDTO){<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decryptResult(obj);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<span style=\"color: #c678dd;line-height: 26px;\">else<\/span>&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>&nbsp;(obj&nbsp;instanceof&nbsp;ArrayList)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decryptList(obj);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">else<\/span>&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decryptObj(obj);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">return<\/span>&nbsp;obj;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;\/**<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\u9488\u5bf9\u5355\u4e2a\u5b9e\u4f53\u7c7b\u8fdb\u884c\u89e3\u5bc6<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;obj<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;IllegalAccessException<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;decryptObj(Object&nbsp;obj)&nbsp;throws&nbsp;IllegalAccessException&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field[]&nbsp;fields&nbsp;=&nbsp;obj.getClass().getDeclaredFields();<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">for<\/span>&nbsp;(Field&nbsp;field&nbsp;:&nbsp;fields)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;hasSecureField&nbsp;=&nbsp;field.isAnnotationPresent(EncryptFields.class);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>&nbsp;(hasSecureField)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;field.setAccessible(<span style=\"color: #56b6c2;line-height: 26px;\">true<\/span>);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;realValue&nbsp;=&nbsp;(String)&nbsp;field.get(obj);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;value&nbsp;=&nbsp;stringEncryptor.decrypt(realValue);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u81ea\u5b9a\u4e49\u52a0\u5bc6\u89e3\u5bc6<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/String&nbsp;value&nbsp;=&nbsp;MyEncryptUtil.decrypt(realValue,<span style=\"color: #98c379;line-height: 26px;\">\"551b789c25cfbe731f723eab5906de5c\"<\/span>);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;field.set(obj,&nbsp;value);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;\/**<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\u9488\u5bf9list&lt;\u5b9e\u4f53\u6765&gt;&nbsp;\u8fdb\u884c\u53cd\u5c04\u3001\u89e3\u5bc6<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;obj<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;IllegalAccessException<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;decryptList(Object&nbsp;obj)&nbsp;throws&nbsp;IllegalAccessException&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>&nbsp;(obj&nbsp;instanceof&nbsp;ArrayList)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">for<\/span>&nbsp;(Object&nbsp;o&nbsp;:&nbsp;(List&lt;?&gt;)&nbsp;obj)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decryptObj(o);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;\/**<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;\u9488\u5bf9\u81ea\u5b9a\u4e49result\u8fdb\u884c\u53cd\u5c04\u3001\u89e3\u5bc6<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;obj<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;IllegalAccessException<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;decryptResult(Object&nbsp;obj)&nbsp;throws&nbsp;IllegalAccessException&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>&nbsp;(obj&nbsp;instanceof&nbsp;ResultDTO)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #c678dd;line-height: 26px;\">if<\/span>(((ResultDTO)&nbsp;obj).getData()&nbsp;instanceof&nbsp;ArrayList){<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decryptList(((ResultDTO)&nbsp;obj).getData());<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<span style=\"color: #c678dd;line-height: 26px;\">else<\/span>{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decryptObj(((ResultDTO)&nbsp;obj).getData());<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/><br  \/>&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;String&nbsp;decryptValue(Object&nbsp;realValue)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u4e5f\u53ef\u81ea\u5b9a\u4e49\u52a0\u5bc6\u89e3\u5bc6\uff0c\u8fd9\u91cc\u7528\u81ea\u5e26\u7684<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;realValue&nbsp;=&nbsp;stringEncryptor.encrypt(String.valueOf(realValue));<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u81ea\u5b9a\u4e49\u52a0\u5bc6\u89e3\u5bc6<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/realValue&nbsp;=&nbsp;MyEncryptUtil.decrypt(String.valueOf(realValue),<span style=\"color: #98c379;line-height: 26px;\">\"551b789c25cfbe731f723eab5906de5c\"<\/span>);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;catch&nbsp;(Exception&nbsp;e)&nbsp;{<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(<span style=\"color: #98c379;line-height: 26px;\">\"\u89e3\u5bc6\u5f02\u5e38={}\"<\/span>,&nbsp;e.getMessage());<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #e6c07b;line-height: 26px;\">return<\/span>&nbsp;String.valueOf(realValue);<br  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br  \/>}<br  \/><\/code><\/pre>\n<\/section>\n<p><br  \/><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u4e00\u5b89\u672a\u6765              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u4e00\u5b89\uff0c\u4eca\u5929\u804a\u4e00\u4e0bspringboot\u5229\u7528aop+jasypt\u5b9e\u73b0\u5bf9\u4f20\u5165\u654f\u611f\u6570\u636e\u7684\u8131\u654f\u3002 \u524d\u8a00 \u4e0d\u7ba1\u4ec0\u4e48\u9879\u76ee\uff0c\u603b\u4f1a\u6709\u4e00\u4e9b &#8230;<\/p>\n","protected":false},"author":1,"featured_media":2356,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-2358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627152115657-150x150.jpeg","content_first_image":null,"post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627152115657-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627152115657.jpeg","post_frist_image":null,"post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627152115657-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627152115657.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/06\/20230627152115657.jpeg","post_all_images":[],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2023-06-27","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":235,"next_post_id":2603,"next_post_title":"SpringBoot bean\u81ea\u52a8\u88c5\u914d\u539f\u7406\uff0c\u8fd9\u4e00\u7bc7\u5c31\u591f\u4e86\uff01","previous_post_id":2334,"previous_post_title":"Spring Boot + Mybatis Plus + ClickHouse \u8f7b\u677e\u5b9e\u73b0\u589e\u5220\u6539\u67e5\uff0c\u770b\u4e86\u5fc5\u61c2\uff01","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2358"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2358\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/2356"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}