{"id":758,"date":"2023-05-28T02:10:40","date_gmt":"2023-05-27T18:10:40","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=758"},"modified":"2023-05-28T02:10:40","modified_gmt":"2023-05-27T18:10:40","slug":"%e4%bd%bf%e7%94%a8spring-aop%e5%ae%9e%e7%8e%b0%e6%8e%a5%e5%8f%a3%e6%9d%83%e9%99%90%e8%ae%a4%e8%af%81","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/%e4%bd%bf%e7%94%a8spring-aop%e5%ae%9e%e7%8e%b0%e6%8e%a5%e5%8f%a3%e6%9d%83%e9%99%90%e8%ae%a4%e8%af%81\/","title":{"rendered":"\u4f7f\u7528Spring AOP\u5b9e\u73b0\u63a5\u53e3\u6743\u9650\u8ba4\u8bc1"},"content":{"rendered":"<div class='wxsyncmain'>\n<section class=\"mp_profile_iframe_wrp\"><mpprofile class=\"js_uneditable custom_select_card mp_profile_iframe\" data-pluginname=\"mpprofile\" data-id=\"MzI3ODE5MzczNA==\" data-headimg=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/OC2PjnBlMZjfG0runo5zRtBa1dg8yFpntGDt5MNIAebFk64aXRNNd6wVZVZSaC88XXxyjrnWC4F9Wibptm4phQA\/0?wx_fmt=png\" data-nickname=\"\u6e23\u7537\u5c0f\u56db\" data-alias=\"\" data-signature=\"\u5bfb\u5e38\u7684\u74e6\u820d\u8bc4\u4e66\uff0c\u6697\u85cf\u7740\u6551\u4e16\u79d8\u8bc0\u3002\" data-from=\"0\"><\/mpprofile><\/section>\n<section><br  \/><\/section>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: -1.5rem;margin-bottom: 1rem;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><strong><span style=\"font-size: 20px;\">\u7801\u519c\u5728\u56e7\u9014<\/span><\/strong><\/h3>\n<blockquote style=\"box-sizing: border-box;color: rgb(102, 102, 102);padding: 1px 23px;margin-top: 22px;margin-bottom: 22px;border-left-width: 0.5rem;border-color: rgb(66, 185, 131);background-color: rgb(248, 248, 248);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;\">\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 10px;margin-bottom: 10px;\">\u5982\u679c\u4f60\u89c9\u5f97\u4f60\u7684\u7956\u56fd\u4e0d\u597d\uff0c\u4f60\u5c31\u53bb\u5efa\u8bbe\u5b83\uff0c\u5982\u679c\u4f60\u89c9\u5f97\u653f\u5e9c\u4e0d\u597d\uff0c\u4f60\u5c31\u53bb\u8003\u516c\u52a1\u5458\u53bb\u505a\u5b98\uff0c\u5982\u679c\u4f60\u89c9\u5f97\u4eba\u6c11\u6ca1\u7d20\u8d28\uff0c\u5c31\u4ece\u4f60\u5f00\u59cb\u505a\u4e00\u4e2a\u9ad8\u7d20\u8d28\u7684\u516c\u6c11\uff0c\u5982\u679c\u4f60\u89c9\u5f97\u540c\u80de\u611a\u6627\u65e0\u77e5\uff0c\u5c31\u4ece\u4f60\u5f00\u59cb\u5b66\u4e60\u5e76\u6539\u53d8\u8eab\u8fb9\u7684\u4eba\uff0c\u800c\u4e0d\u662f\u4e00\u6627\u7684\u8c29\u9a82\uff0c\u62b1\u6028\uff0c\u9003\u79bb\u3002\u6a2a\u7709\u51b7\u5bf9\u5e72\u592b\u6307\uff0c\u4fef\u9996\u7518\u4e3a\u5b7a\u5b50\u725b\u3002<\/p>\n<\/blockquote>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 35px;margin-bottom: 10px;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><strong><span style=\"font-size: 20px;\">\u524d\u8a00<\/span><\/strong><\/h3>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;\"><span style=\"background-color: rgb(255, 255, 255);\">\u6743\u9650\u8ba4\u8bc1\u662f\u6bcf\u4e2a\u7a0b\u5e8f\u6700\u57fa\u672c\u4e5f\u662f\u6700\u91cd\u8981\u7684\u90e8\u5206\uff0c\u6211\u4eec\u5728\u8f6f\u4ef6\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u5bf9\u63a5\u53e3\u7684\u6743\u9650\u8ba4\u8bc1\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\uff0c\u4e00\u822c\u6211\u4eec\u4f1a\u91c7\u7528\u5f00\u6e90\u7684\u6846\u67b6\u8fdb\u884c\u8ba4\u8bc1\uff0c\u6bd4\u5982Apache Shiro\uff0cSpringSecurity\u7b49\u5b89\u5168\u6846\u67b6\uff0c\u719f\u6089Shrio<\/span>\u548c<code style=\"background-color: rgba(27, 31, 35, 0.05);box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;border-radius: 3px;\">SpringSecurity<\/code><span style=\"background-color: rgb(255, 255, 255);\">\u7684\u540c\u5b66\u901a\u5e38\u4f1a\u5728\u63a5\u53e3\u4e0a\u770b\u5230<\/span><code style=\"background-color: rgba(27, 31, 35, 0.05);box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;border-radius: 3px;\">@RequiresPermissions(\"sys:user:add\")<\/code><span style=\"background-color: rgb(255, 255, 255);\">,<\/span><code style=\"background-color: rgba(27, 31, 35, 0.05);box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;border-radius: 3px;\">@PreAuthorize(\"hasRole('admin')\")<\/code><span style=\"background-color: rgb(255, 255, 255);\">\u8fd9\u6837\u7684\u6ce8\u89e3\uff0c\u524d\u4e00\u4e2a\u662fShrio\u7684\uff0c\u662f\u57fa\u4e8e\u64cd\u4f5c\u7684\u65b9\u5f0f\uff0c\u540e\u4e00\u79cd\u662fSpringSecurity\u7684\uff0c\u662f\u57fa\u4e8e\u89d2\u8272\u7684\uff0c\u90a3\u4e48\u6211\u4eec\u8be5\u600e\u4e48\u5b9e\u73b0\u4e00\u4e2a\u81ea\u5df1\u7684\u6743\u9650\u8ba4\u8bc1\u6846\u67b6\u5462\uff0c\u5176\u5b9e\u5b9e\u73b0\u5e76\u4e0d\u96be\uff0c\u4eca\u5929\u6211\u4eec\u5c31\u4f7f\u7528\u5207\u9762AOP\u6765\u5b9e\u73b0\u63a5\u53e3\u7684\u6743\u9650\u8ba4\u8bc1\u3002<\/span><\/p>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 35px;margin-bottom: 10px;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><span style=\"font-size: 20px;\"><strong>\u5b9e\u73b0\u6b65\u9aa4<\/strong><\/span><\/h3>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u6211\u4eec\u662f\u57fa\u4e8eSpring\u7684AOP\u5b9e\u73b0\uff0c\u4f7f\u7528\u58f0\u660e\u5f0f\u6ce8\u89e3\uff0c\u57fa\u4e8e\u89d2\u8272\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\uff0c\u53ea\u9700\u8981\u5728\u9700\u8981\u8ba4\u8bc1\u7684\u63a5\u53e3\u4e0a\u52a0\u4e0a\u6ce8\u89e3\uff0c\u5e76\u6307\u660e\u4ec0\u4e48\u89d2\u8272\u80fd\u8bbf\u95ee\uff0c\u5f53\u7528\u6237\u53d1\u8d77\u8bbf\u95ee\u7684\u65f6\u5019\uff0c\u5982\u679c\u6743\u9650\u6ce8\u89e3\u5305\u542b\u8bbf\u95ee\u7684\u7528\u6237\u89d2\u8272\uff0c\u90a3\u4e48\u5c31\u653e\u884c\uff0c\u5982\u679c\u4e0d\u5305\u542b\u8bbf\u95ee\u7528\u6237\u7684\u89d2\u8272\uff0c\u5219\u62d2\u7edd\u8bbf\u95ee\u3002<\/p>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u4e0b\u9762\u5f00\u59cb\u7f16\u7801\u5b9e\u73b0<\/p>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 35px;margin-bottom: 10px;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><strong><span style=\"font-size: 20px;\">\u6743\u9650\u6ce8\u89e3<\/span><\/strong><\/h3>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u5b9a\u4e49\u4e00\u4e2a\u6ce8\u89e3<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">@PreAuthorize<\/code>,\u6807\u6ce8\u5728\u65b9\u6cd5\u4e0a\uff0c\u53c2\u6570\u4e3a\u4e00\u4e2a\u6570\u7ec4\uff0c\u56e0\u4e3a\u540c\u4e00\u4e2a\u63a5\u53e3\u4e00\u822c\u9700\u8981\u80fd\u591f\u591a\u4e2a\u89d2\u8272\u8bbf\u95ee\u3002<\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;border-radius: 6px;border-width: 2px;border-style: solid;border-color: rgb(62, 175, 124);color: rgb(171, 178, 191);background: rgb(40, 44, 52);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;overflow-x: auto;padding: 15px 12px;font-weight: 700;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;border-radius: 3px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;\">\/**<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Author<\/span> \u5218\u724c<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Date<\/span> 2020\/3\/15 0015 19:16<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Version<\/span> 1.0<br  \/> *\/<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Retention(RetentionPolicy.RUNTIME)<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Target({ElementType.METHOD})<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Inherited<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@interface<\/span> PreAuthorize {<br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;\">\/**<br  \/> &nbsp; &nbsp; * \u7528\u4e8e\u63a5\u53e3\u4e0a\u7684\u6743\u9650\u9a8c\u8bc1\uff0c\u5bf9\u8c61\u662f\u89d2\u8272\uff0c\u662f\u4e00\u4e2a\u6570\u7ec4<br  \/> &nbsp; &nbsp; * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@return<\/span><br  \/> &nbsp; &nbsp; *\/<\/span><br  \/> &nbsp; &nbsp;String[] value() <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">default<\/span> {}  ;<br  \/>}<br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 35px;margin-bottom: 10px;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><strong><span style=\"font-size: 20px;\">\u5224\u65ad\u662f\u5426\u6709\u8bbf\u95ee\u6743\u9650<\/span><\/strong><\/h3>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">AuthFunc<\/code>\u7c7b\u7684\u4f5c\u7528\u662f\u5224\u65ad\u8bf7\u6c42\u7528\u6237\u662f\u5426\u6709\u8bbf\u95ee\u6743\u9650\uff0c\u53c2\u6570\u4e3a<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">PreAuthorize<\/code>\u6ce8\u89e3\u548c\u4e00\u4e2a\u89d2\u8272\u96c6\u5408<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">roles<\/code>\uff0c\u8fd9\u4e2a\u89d2\u8272\u96c6\u5408\u662f\u8bf7\u6c42\u7528\u6237\u7684\u89d2\u8272\u96c6\u5408\uff0c\u5982\u679c\u80fd\u591f\u8bbf\u95ee\uff0c\u8fd4\u56de<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">true<\/code>\uff0c\u5426\u5219\u8fd4\u56de<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">false<\/code>\u3002<\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;border-radius: 6px;border-width: 2px;border-style: solid;border-color: rgb(62, 175, 124);color: rgb(171, 178, 191);background: rgb(40, 44, 52);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;overflow-x: auto;padding: 15px 12px;font-weight: 700;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;border-radius: 3px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;\">\/**<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Author<\/span> \u5218\u724c<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Date<\/span> 2020\/3\/18 0018 23:31<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Version<\/span> 1.0<br  \/> *\/<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(230, 192, 123);\">AuthFunc<\/span> <\/span>{<br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;\">\/**<br  \/> &nbsp; &nbsp; * \u5224\u65ad\u7528\u6237\u80fd\u5426\u8bbf\u95ee\u63a5\u53e3 , \u8fd4\u56detrue\u4ee3\u8868\u6709\u6743\u9650 \uff0c \u8fd4\u56defalse\u4ee3\u8868\u6ca1\u6743\u9650<br  \/> &nbsp; &nbsp; * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@param<\/span> auth<br  \/> &nbsp; &nbsp; * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@return<\/span><br  \/> &nbsp; &nbsp; *\/<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">static<\/span> <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">boolean<\/span> <span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">isContain<\/span><span style=\"box-sizing: border-box;\">(PreAuthorize auth , List&lt;String&gt; roles)<\/span><\/span>{<br  \/> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">return<\/span> !Collections.disjoint(<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">new<\/span> ArrayList&lt;&gt;(Arrays.asList(auth.value())),roles);<br  \/> &nbsp;  }<br  \/>}<br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 35px;margin-bottom: 10px;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><span style=\"font-size: 20px;\"><strong>\u6743\u9650\u5207\u9762<\/strong><\/span><\/h3>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">SecurityAspect<\/code>\u7c7b\u662f\u4e00\u4e2a\u5207\u9762\uff0c\u4f7f\u7528\u6ce8\u89e3<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">@Aspect<\/code>\u8fdb\u884c\u6807\u6ce8\uff0c\u6ce8\u610f\u8fd8\u9700\u8981\u6807\u6ce8<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">@Component<\/code>\u6ce8\u89e3\uff0c\u8868\u793a\u8fd9\u4e2a\u5207\u9762\u662f\u4e00\u4e2aBean\uff0c\u4e0d\u7136Spring\u7ba1\u7406\u4e0d\u5230\uff0c\u8fd9\u4e2a\u5207\u9762\u7684\u4f5c\u7528\u662f\u62e6\u622a\u8bf7\u6c42\uff0c\u56e0\u4e3a\u6211\u4eec\u5728\u7cfb\u7edf\u53d1\u8d77\u8bf7\u6c42\u80af\u5b9a\u4f1a\u5e26\u4e0a\u4e00\u4e2a<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">token<\/code>\uff0c\u8fd9\u4e2atoken\u4e00\u822c\u6211\u4eec\u4f7f\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">JWT<\/code>\u6765\u751f\u6210\uff0c\u7136\u540e\u653e\u5728\u8bf7\u6c42\u5934\u4e0a\uff0ctoken\u91cc\u9762\u4e00\u822c\u4f1a\u5305\u542b\u7528\u6237\u4fe1\u606f\uff0c\u5728SecurityAspect\u5207\u9762\u4e2d\u6211\u4eec\u901a\u8fc7<\/p>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">HttpServletRequest<\/code>\u6765\u83b7\u53d6\u8bf7\u6c42\u5934token\uff0c\u7136\u540e\u89e3\u6790\u51fa\u89d2\u8272\u96c6\u5408\uff0c\u7136\u540e\u8c03\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">AuthFunc.isContain(auth, roles)<\/code>\u65b9\u6cd5\u5224\u65ad\u662f\u5426\u6709\u8bbf\u95ee\u6743\u9650\uff0c\u5982\u679c\u6709\uff0c\u5219\u653e\u884c\u8bf7\u6c42\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u5219\u63d0\u793a\u6ca1\u6709\u6743\u9650\u4fe1\u606f\u3002<\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;border-radius: 6px;border-width: 2px;border-style: solid;border-color: rgb(62, 175, 124);color: rgb(171, 178, 191);background: rgb(40, 44, 52);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;overflow-x: auto;padding: 15px 12px;font-weight: 700;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;border-radius: 3px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;\">\/**<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Author<\/span> \u5218\u724c<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Date<\/span> 2020\/3\/13 0013 18:04<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Version<\/span> 1.0<br  \/> *\/<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Component<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Aspect<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(230, 192, 123);\">SecurityAspect<\/span> <\/span>{<br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Resource<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">private<\/span> HttpServletRequest request;<br  \/><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Pointcut(\"@annotation(auth)\")<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">pointcutPreAuthorize<\/span><span style=\"box-sizing: border-box;\">(PreAuthorize auth)<\/span> <\/span>{<br  \/> &nbsp;  }<br  \/><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Around(\"pointcutPreAuthorize(auth)\")<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> Object <span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">doPreAuthorize<\/span><span style=\"box-sizing: border-box;\">(ProceedingJoinPoint point, PreAuthorize auth)<\/span> <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">throws<\/span> Throwable <\/span>{<br  \/> &nbsp; &nbsp; &nbsp; &nbsp;String token = request.getHeader(GlobalConstant.TOKEN);<br  \/> &nbsp; &nbsp; &nbsp; &nbsp;List&lt;String&gt; roles = JWT.decode(token).getClaim(PayloadConstant.ROLE_NAME_LIST).asList(String.class);<br  \/> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">if<\/span> (AuthFunc.isContain(auth, roles)) {<br  \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">return<\/span> point.proceed();<br  \/> &nbsp; &nbsp; &nbsp;  } <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">else<\/span> {<br  \/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">throw<\/span> <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">new<\/span> BusinessException(<span style=\"box-sizing: border-box;color: rgb(152, 195, 121);\">\"\u6ca1\u6709\u8bbf\u95ee\u6743\u9650\"<\/span>);<br  \/> &nbsp; &nbsp; &nbsp;  }<br  \/> &nbsp;  }<br  \/>}<br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 35px;margin-bottom: 10px;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><strong><span style=\"font-size: 20px;\">\u4f7f\u7528<\/span><\/strong><\/h3>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u5728\u9700\u8981\u5728\u6743\u9650\u8ba4\u8bc1\u7684\u63a5\u53e3\u4e0a\u6807\u6ce8<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">@PreAuthorize<\/code>\u6ce8\u89e3\uff0c\u5982\u4e0b\u6807\u6ce8\u4e86<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">@PreAuthorize({\"super_admin\",\"admin\"})<\/code>\u6ce8\u89e3\uff0c\u4ee3\u8868\u6b64\u63a5\u53e3\u9700\u8981\u6709<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">\"super_admin\"<\/code>\u548c<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.85em;word-break: break-word;overflow-x: auto;padding: 0.2rem 0.5rem;color: rgb(62, 175, 124);font-weight: 700;background-color: rgba(27, 31, 35, 0.05);border-radius: 3px;\">\"admin\"<\/code>\u89d2\u8272\u624d\u80fd\u64cd\u4f5c\u3002<\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;border-radius: 6px;border-width: 2px;border-style: solid;border-color: rgb(62, 175, 124);color: rgb(171, 178, 191);background: rgb(40, 44, 52);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;overflow-x: auto;padding: 15px 12px;font-weight: 700;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;border-radius: 3px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;\">\/**<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Author<\/span> \u5218\u724c<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Date<\/span> 2020\/4\/22 0022 23:45<br  \/> * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@Version<\/span> 1.0<br  \/> *\/<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@RestController<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@RequestMapping(\"\/menu\")<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(230, 192, 123);\">MenuController<\/span> <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">extends<\/span> <span style=\"box-sizing: border-box;color: rgb(230, 192, 123);\">BaseController<\/span> <\/span>{<br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@Resource<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">private<\/span> IMenuService menuService;<br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;\">\/**<br  \/> &nbsp; &nbsp; * \u6dfb\u52a0\u83dc\u5355<br  \/> &nbsp; &nbsp; * <span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">@param<\/span> menu<br  \/> &nbsp; &nbsp; *\/<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@PostMapping(\"\/add\")<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@PreAuthorize({\"super_admin\",\"admin\"})<\/span><br  \/> &nbsp; &nbsp;<span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">public<\/span> R <span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">add<\/span><span style=\"box-sizing: border-box;\">(<span style=\"box-sizing: border-box;color: rgb(97, 174, 238);\">@RequestBody<\/span> Menu menu)<\/span><\/span>{<br  \/> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(198, 120, 221);\">return<\/span> R.success(menuService.add(menu));<br  \/> &nbsp;  }<br  \/>}<br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 35px;margin-bottom: 10px;font-size: 1.5rem;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><strong><span style=\"font-size: 20px;\">\u7ed3\u8bed<\/span><\/strong><\/h3>\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 22px;margin-bottom: 22px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u901a\u8fc7\u4e0a\u9762\u7684\u64cd\u4f5c\uff0c\u6211\u4eec\u5c31\u5b8c\u6210\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u57fa\u4e8e\u89d2\u8272\u7684\u63a5\u53e3\u6743\u9650\u8ba4\u8bc1\uff0c\u6bd4\u8f83\u7b80\u5355\uff0c\u6838\u5fc3\u5c31\u662f\u4f7f\u7528AOP\uff0c\u4f46\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u5f80\u5f80\u4f1a\u6709\u591a\u79cd\u60c5\u51b5\uff0c\u4f7f\u7528\u57fa\u4e8e\u89d2\u8272\u7684\u63a5\u53e3\u6743\u9650\u8ba4\u8bc1\u663e\u5f97\u7c92\u5ea6\u6709\u4e00\u70b9\u5927\uff0c\u90a3\u4e48\u6211\u4eec\u4e5f\u53ef\u4ee5\u5b9e\u73b0AOP\u6765\u5b8c\u6210\u57fa\u4e8e\u64cd\u4f5c\uff08\u6bd4\u5982\u6309\u94ae\u64cd\u4f5c,sys:user:add\u5f62\u5f0f\uff09\u7684\u8ba4\u8bc1\u65b9\u5f0f\uff0c\u53ea\u9700\u8981\u83b7\u53d6\u7528\u6237\u7684\u64cd\u4f5c\u5217\u8868\uff0c\u7136\u540e\u8fdb\u884c\u5224\u65ad\uff0c\u901a\u5e38\u7528\u6237\u7684\u64cd\u4f5c\u6bd4\u8f83\u591a\uff0c\u4e3a\u4e86\u52a0\u5feb\u8ba4\u8bc1\u7684\u901f\u5ea6\uff0c\u6211\u4eec\u53ef\u4ee5\u653e\u5165\u672c\u5730\u7f13\u5b58\u6216\u8005\u5206\u5e03\u5f0f\u7f13\u5b58\u4e2d\uff0c\u4e0d\u8fc7\u6211\u4eec\u591a\u6570\u90fd\u4f1a\u9009\u62e9\u7ebf\u7a0b\u7684\u6743\u9650\u8ba4\u8bc1\u6846\u67b6\u6765\u8fdb\u884c\u5f00\u53d1\uff0c\u4e0d\u8fc7\u6211\u4eec\u5f88\u6709\u5fc5\u8981\u81ea\u5df1\u53bb\u9020\u4e00\u4e0b\u8f6e\u5b50\u3002<\/p>\n<blockquote style=\"box-sizing: border-box;color: rgb(102, 102, 102);padding: 1px 23px;margin-top: 22px;margin-bottom: 22px;border-left-width: 0.5rem;border-color: rgb(66, 185, 131);background-color: rgb(248, 248, 248);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;\">\n<p style=\"box-sizing: border-box;line-height: inherit;margin-top: 10px;margin-bottom: 10px;\">\u4eca\u5929\u7684\u5206\u4eab\u5c31\u5230\u8fd9\u91cc\uff0c\u611f\u8c22\u4f60\u7684\u89c2\u770b\uff0c\u6211\u4eec\u4e0b\u671f\u89c1\u3002<\/p>\n<\/blockquote>\n<p><br  \/><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u5218\u724c              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u7801\u519c\u5728\u56e7\u9014 \u5982\u679c\u4f60\u89c9\u5f97\u4f60\u7684\u7956\u56fd\u4e0d\u597d\uff0c\u4f60\u5c31\u53bb\u5efa\u8bbe\u5b83\uff0c\u5982\u679c\u4f60\u89c9\u5f97\u653f\u5e9c\u4e0d\u597d\uff0c\u4f60\u5c31\u53bb\u8003\u516c\u52a1\u5458\u53bb\u505a\u5b98\uff0c\u5982\u679c\u4f60\u89c9\u5f97\u4eba\u6c11\u6ca1\u7d20\u8d28\uff0c\u5c31\u4ece\u4f60\u5f00\u59cb\u505a\u4e00\u4e2a &#8230;<\/p>\n","protected":false},"author":2,"featured_media":757,"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-758","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\/05\/20230528015926981-150x150.jpeg","content_first_image":null,"post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015926981-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015926981-1024x435.jpeg","post_frist_image":null,"post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015926981-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015926981-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015926981.jpeg","post_all_images":[],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2023-05-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":699,"next_post_id":535,"next_post_title":"Controller\u5c42\u4ee3\u7801\u5c31\u8be5\u8fd9\u4e48\u5199\uff0c\u7b80\u6d01\u53c8\u4f18\u96c5\uff01","previous_post_id":583,"previous_post_title":"Springboot \u52a8\u6001\u914d\u7f6e\u53ca\u4e00\u952e\u6253\u5305\u90e8\u7f72","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/758","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=758"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/758\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/757"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}