{"id":4216,"date":"2024-04-29T08:08:57","date_gmt":"2024-04-29T00:08:57","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring-boot%e8%b7%a8%e5%9f%9f%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3\/"},"modified":"2024-04-29T08:08:57","modified_gmt":"2024-04-29T00:08:57","slug":"spring-boot%e8%b7%a8%e5%9f%9f%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring-boot%e8%b7%a8%e5%9f%9f%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3\/","title":{"rendered":"Spring Boot\u8de8\u57df\u95ee\u9898\u89e3\u51b3"},"content":{"rendered":"<div class='wxsyncmain'>\n<h1 cid=\"n0\" mdtype=\"heading\" style=\"margin-top: 1rem;margin-bottom: 1rem;padding-bottom: 0.3em;outline: 0px;font-weight: bold;letter-spacing: 0.544px;white-space: pre-wrap;color: rgb(34, 34, 34);background-color: rgb(255, 255, 255);line-height: 1.2;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);width: inherit;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start;visibility: visible;\"><span style=\"outline: 0px;color: rgb(178, 178, 178);visibility: visible;\">\u5982\u679c\u6587\u7ae0\u4e2d\u4ee3\u7801\u4e0d\u4fbf\u4e8e\u9605\u8bfb\uff0c\u8bf7\u4f7f\u7528\u7535\u8111\u67e5\u770b\u6216\u70b9\u51fb\u9605\u8bfb\u539f\u6587\u3002\u6e90\u7801\u8be6\u89c1\uff1a<\/span><\/h1>\n<p style=\"outline: 0px;font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;text-wrap: wrap;background-color: rgb(255, 255, 255);visibility: visible;\"><span style=\"outline: 0px;color: rgb(178, 178, 178);visibility: visible;\"><span style=\"outline: 0px;font-weight: 700;color: rgb(77, 77, 77);font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif;font-size: 16px;font-variant-ligatures: no-common-ligatures;letter-spacing: normal;text-align: start;visibility: visible;\">GitHub\uff1ahttps:\/\/github.com\/dkbnull\/SpringBootDemo<\/span><span style=\"outline: 0px;font-weight: 700;color: rgb(77, 77, 77);font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif;font-size: 16px;font-variant-ligatures: no-common-ligatures;letter-spacing: normal;text-align: start;visibility: visible;\">Gitee\uff1ahttps:\/\/gitee.com\/dkbnull\/SpringBootDemo<\/span><\/span><\/p>\n<h1 cid=\"n64\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">0 \u5f00\u53d1\u73af\u5883<\/span><\/h1>\n<ul class=\"list-paddingleft-1\" cid=\"n67\" mdtype=\"list\" data-mark=\"-\" style=\"margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\">\n<li>\n<p cid=\"n69\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">JDK\uff1a1.8<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n71\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">Spring Boot\uff1a2.7.18<\/span><\/p>\n<\/li>\n<\/ul>\n<h1 cid=\"n3\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1 \u8de8\u57df\u8bf7\u6c42<\/span><\/h1>\n<p cid=\"n4\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5728\u8bf7\u6c42\u65f6\uff0c\u5982\u679c\u51fa\u73b0\u4e86\u4ee5\u4e0b\u60c5\u51b5\u4e2d\u7684\u4efb\u610f\u4e00\u79cd\uff0c\u90a3\u4e48\u5b83\u5c31\u662f\u8de8\u57df\u8bf7\u6c42\uff1a<\/span><\/p>\n<p cid=\"n5\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u534f\u8bae\u4e0d\u540c\uff0c\u5982 http \u548c https\uff1b<\/strong><\/span><\/p>\n<p cid=\"n6\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u57df\u540d\u4e0d\u540c\uff1b<\/strong><\/span><\/p>\n<p cid=\"n7\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u7aef\u53e3\u4e0d\u540c\uff1b<\/strong><\/span><\/p>\n<h1 cid=\"n8\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2 \u8de8\u57df\u95ee\u9898\u6f14\u793a<\/span><\/h1>\n<h2 cid=\"n9\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.1 \u914d\u7f6e\u7aef\u53e3<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"yml\" cid=\"n10\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">server<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">  port<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">8090<\/span><\/span><\/pre>\n<h2 cid=\"n11\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.2 \u65b0\u5efa\u8bbf\u95ee\u63a5\u53e3<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n12\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RestController<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RequestMapping<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"user\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">UserController<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@PostMapping<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"login\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">login<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(170, 17, 17);\">\"\u59d3\u540d\uff1a\u5f20\u4e09\uff1b\u6027\u522b\uff1a\u7537\"<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n13\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.3 \u65b0\u5efa\u524d\u7aef\u9875\u9762<\/span><\/h2>\n<p cid=\"n14\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u65b0\u5efa\u524d\u7aef\u9875\u9762<\/span><span md-inline=\"strong\"><strong>login.html<\/strong><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"html\" cid=\"n15\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">&lt;!DOCTYPE html&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">html<\/span> <span style=\"color: rgb(0, 0, 204);\">lang<\/span>=<span style=\"color: rgb(170, 17, 17);\">\"en\"<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">head<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">meta<\/span> <span style=\"color: rgb(0, 0, 204);\">charset<\/span>=<span style=\"color: rgb(170, 17, 17);\">\"UTF-8\"<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">title<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>\u767b\u5f55<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">title<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">style<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(85, 85, 85);\">.container<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">width<\/span>: <span style=\"color: rgb(17, 102, 68);\">300px<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">margin<\/span>: <span style=\"color: rgb(34, 17, 153);\">auto<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">padding<\/span>: <span style=\"color: rgb(17, 102, 68);\">40px<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">border<\/span>: <span style=\"color: rgb(17, 102, 68);\">1px<\/span> <span style=\"color: rgb(34, 17, 153);\">solid<\/span> <span style=\"color: rgb(34, 17, 153);\">#ccc<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">background-color<\/span>: <span style=\"color: rgb(119, 0, 136);\">white<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">box-shadow<\/span>: <span style=\"color: rgb(17, 102, 68);\">0<\/span> <span style=\"color: rgb(17, 102, 68);\">0<\/span> <span style=\"color: rgb(17, 102, 68);\">10px<\/span> <span style=\"color: rgb(34, 17, 153);\">rgba<\/span>(<span style=\"color: rgb(17, 102, 68);\">0<\/span>, <span style=\"color: rgb(17, 102, 68);\">0<\/span>, <span style=\"color: rgb(17, 102, 68);\">0<\/span>, <span style=\"color: rgb(17, 102, 68);\">0.1<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(17, 119, 0);\">button<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">width<\/span>: <span style=\"color: rgb(17, 102, 68);\">100%<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">padding<\/span>: <span style=\"color: rgb(17, 102, 68);\">10px<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">color<\/span>: <span style=\"color: rgb(119, 0, 136);\">white<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">background-color<\/span>: <span style=\"color: rgb(34, 17, 153);\">#4CAF50<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">cursor<\/span>: <span style=\"color: rgb(34, 17, 153);\">pointer<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">border<\/span>: <span style=\"color: rgb(34, 17, 153);\">none<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">outline<\/span>: <span style=\"color: rgb(34, 17, 153);\">none<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(17, 119, 0);\">button<\/span>:<span style=\"color: rgb(0, 136, 85);\">hover<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">opacity<\/span>: <span style=\"color: rgb(17, 102, 68);\">0.9<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">style<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">head<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">body<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">div<\/span> <span style=\"color: rgb(0, 0, 204);\">class<\/span>=<span style=\"color: rgb(170, 17, 17);\">\"container\"<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">button<\/span> <span style=\"color: rgb(0, 0, 204);\">onclick<\/span>=<span style=\"color: rgb(170, 17, 17);\">\"submit()\"<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>\u767b \u5f55<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">button<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">div<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">body<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">script<\/span> <span style=\"color: rgb(0, 0, 204);\">src<\/span>=<span style=\"color: rgb(170, 17, 17);\">\"jquery-3.7.1.min.js\"<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">script<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">script<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">function<\/span> <span style=\"color: rgb(0, 0, 255);\">submit<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">$<\/span>.<span style=\"color: rgb(0, 0, 0);\">ajax<\/span>({<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">url<\/span>: <span style=\"color: rgb(170, 17, 17);\">\"http:127.0.0.1:8090\/user\/login\"<\/span>,<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">type<\/span>: <span style=\"color: rgb(170, 17, 17);\">\"POST\"<\/span>,<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">success<\/span>: <span style=\"color: rgb(119, 0, 136);\">function<\/span> (<span style=\"color: rgb(0, 0, 255);\">result<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">        <span style=\"color: rgb(0, 0, 0);\">alert<\/span>(<span style=\"color: rgb(0, 85, 170);\">result<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">       }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     });<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">script<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">html<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><\/pre>\n<h2 cid=\"n16\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.4 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n17\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\u670d\u52a1\uff0c\u7136\u540e\u76f4\u63a5\u672c\u5730\u53cc\u51fb\u6253\u5f00<\/span><span md-inline=\"strong\"><strong>login.html<\/strong><\/span><span md-inline=\"plain\">\uff0c\u70b9\u51fb\u767b\u5f55\u6309\u94ae\uff0c\u5982\u4e0b\u6240\u793a\uff0c\u51fa\u73b0\u8de8\u57df\u95ee\u9898<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000645\" data-ratio=\"0.4622279129321383\" data-s=\"300,640\" data-type=\"png\" data-w=\"781\" style=\"height: auto !important;\"  data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151754808.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000645\" data-ratio=\"0.4622279129321383\" data-s=\"300,640\" data-type=\"png\" data-w=\"781\" style=\"height: auto !important;\"  src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151754808.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n19\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3 \u89e3\u51b3\u529e\u6cd5<\/span><\/h1>\n<p cid=\"n20\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u901a\u5e38\u8de8\u57df\u95ee\u9898\u4f7f\u7528\u4ee5\u4e0b6\u4e2a\u65b9\u6cd5\u89e3\u51b3<\/span><\/p>\n<ul class=\"list-paddingleft-1\" cid=\"n21\" mdtype=\"list\" data-mark=\"*\" style=\"margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\">\n<li>\n<p cid=\"n23\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"strong\"><strong>\u4f7f\u7528 @CrossOrigin \u6ce8\u89e3\u5b9e\u73b0\u8de8\u57df\uff1b<\/strong><\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n25\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"strong\"><strong>\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u5b9e\u73b0\u8de8\u57df\uff1b<\/strong><\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n27\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"strong\"><strong>\u901a\u8fc7 CorsFilter \u5bf9\u8c61\u5b9e\u73b0\u8de8\u57df\uff1b<\/strong><\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n29\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"strong\"><strong>\u901a\u8fc7 Response \u5bf9\u8c61\u5b9e\u73b0\u8de8\u57df\uff1b<\/strong><\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n31\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"strong\"><strong>\u901a\u8fc7\u5b9e\u73b0 ResponseBodyAdvice \u5b9e\u73b0\u8de8\u57df\uff1b<\/strong><\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n33\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"strong\"><strong>\u4f7f\u7528\u8fc7\u6ee4\u5668\u6765\u5b9e\u73b0\u8de8\u57df\uff1b<\/strong><\/span><\/p>\n<\/li>\n<\/ul>\n<h2 cid=\"n34\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1 \u901a\u8fc7@CrossOrigin\u6ce8\u89e3\u8de8\u57df<\/span><\/h2>\n<p cid=\"n35\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>@CrossOrigin\u6ce8\u89e3\u53ef\u4ee5\u4fee\u9970\u7c7b\u548c\u65b9\u6cd5\u3002\u5f53\u4fee\u9970\u7c7b\u65f6\uff0c\u8868\u793a\u6b64\u7c7b\u4e2d\u7684\u6240\u6709\u63a5\u53e3\u90fd\u53ef\u4ee5\u8de8\u57df\uff1b\u5f53\u4fee\u9970\u65b9\u6cd5\u65f6\uff0c\u8868\u793a\u6b64\u65b9\u6cd5\u53ef\u4ee5\u8de8\u57df<\/strong><\/span><span md-inline=\"plain\">\uff0c<\/span><\/p>\n<h3 cid=\"n36\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1.1 \u8c03\u6574\u63a5\u53e3\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n37\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RestController<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RequestMapping<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"user\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@CrossOrigin<\/span>(<span style=\"color: rgb(0, 0, 0);\">origins<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">UserController<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@PostMapping<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"login\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">login<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(170, 17, 17);\">\"\u59d3\u540d\uff1a\u5f20\u4e09\uff1b\u6027\u522b\uff1a\u7537\"<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n38\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1.2 \u6d4b\u8bd5<\/span><\/h3>\n<p cid=\"n39\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\u670d\u52a1\uff0c\u8bbf\u95ee\u9875\u9762\uff0c\u70b9\u51fb\u767b\u5f55\u6309\u94ae\uff0c\u63a5\u53e3\u8bbf\u95ee\u6210\u529f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000646\" data-ratio=\"0.4489528795811518\" data-s=\"300,640\" data-type=\"png\" data-w=\"764\" style=\"height: auto !important;\"  data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151756522.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000646\" data-ratio=\"0.4489528795811518\" data-s=\"300,640\" data-type=\"png\" data-w=\"764\" style=\"height: auto !important;\"  src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151756522.png\"  \/><\/noscript><\/p>\n<h3 cid=\"n41\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1.3 \u4f18\u7f3a\u70b9<\/span><\/h3>\n<p cid=\"n42\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4f18\u70b9\uff1a\u5b9e\u73b0\u8de8\u57df\u975e\u5e38\u7b80\u5355<\/span><\/p>\n<p cid=\"n43\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u7f3a\u70b9\uff1a\u53ea\u80fd\u5b9e\u73b0\u5c40\u90e8\u8de8\u57df\uff0c\u5f53\u4e00\u4e2a\u9879\u76ee\u4e2d\u5b58\u5728\u591a\u4e2a\u7c7b\u65f6\uff0c\u9700\u8981\u7ed9\u6240\u6709\u7c7b\u4e0a\u90fd\u6dfb\u52a0\u6b64\u6ce8\u89e3\uff0c\u6bd4\u8f83\u9ebb\u70e6<\/span><\/p>\n<h2 cid=\"n44\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.2 \u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u8de8\u57df<\/span><\/h2>\n<p cid=\"n45\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u7684\u65b9\u5f0f\u53ef\u5b9e\u73b0\u5168\u5c40\u8de8\u57df<\/strong><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n46\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Configuration<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">CorsConfig<\/span> <span style=\"color: rgb(119, 0, 136);\">implements<\/span> <span style=\"color: rgb(0, 0, 0);\">WebMvcConfigurer<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Override<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">addCorsMappings<\/span>(<span style=\"color: rgb(0, 0, 0);\">CorsRegistry<\/span> <span style=\"color: rgb(0, 0, 0);\">registry<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u652f\u6301\u6240\u6709\u63a5\u53e3<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">registry<\/span>.<span style=\"color: rgb(0, 0, 0);\">addMapping<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\/**\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">        <span style=\"color: rgb(170, 85, 0);\">\/\/\u662f\u5426\u53d1\u9001Cookie<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">allowCredentials<\/span>(<span style=\"color: rgb(34, 17, 153);\">true<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">        <span style=\"color: rgb(170, 85, 0);\">\/\/\u652f\u6301\u57df<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">allowedOriginPatterns<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">allowedMethods<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"GET\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"POST\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"PUT\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"DELETE\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">allowedHeaders<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">exposedHeaders<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n47\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.3 \u901a\u8fc7CorsFilter\u8de8\u57df<\/span><\/h2>\n<p cid=\"n48\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u53ef\u5b9e\u73b0\u5168\u5c40\u8de8\u57df<\/strong><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n49\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">import<\/span> <span style=\"color: rgb(0, 0, 0);\">org<\/span>.<span style=\"color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"color: rgb(0, 0, 0);\">context<\/span>.<span style=\"color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"color: rgb(0, 0, 0);\">Bean<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">import<\/span> <span style=\"color: rgb(0, 0, 0);\">org<\/span>.<span style=\"color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"color: rgb(0, 0, 0);\">context<\/span>.<span style=\"color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"color: rgb(0, 0, 0);\">Configuration<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">import<\/span> <span style=\"color: rgb(0, 0, 0);\">org<\/span>.<span style=\"color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"color: rgb(0, 0, 0);\">web<\/span>.<span style=\"color: rgb(0, 0, 0);\">cors<\/span>.<span style=\"color: rgb(0, 0, 0);\">CorsConfiguration<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">import<\/span> <span style=\"color: rgb(0, 0, 0);\">org<\/span>.<span style=\"color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"color: rgb(0, 0, 0);\">web<\/span>.<span style=\"color: rgb(0, 0, 0);\">cors<\/span>.<span style=\"color: rgb(0, 0, 0);\">UrlBasedCorsConfigurationSource<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">import<\/span> <span style=\"color: rgb(0, 0, 0);\">org<\/span>.<span style=\"color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"color: rgb(0, 0, 0);\">web<\/span>.<span style=\"color: rgb(0, 0, 0);\">filter<\/span>.<span style=\"color: rgb(0, 0, 0);\">CorsFilter<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Configuration<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">GlobalCorsFilter<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">CorsFilter<\/span> <span style=\"color: rgb(0, 0, 0);\">corsFilter<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">CorsConfiguration<\/span> <span style=\"color: rgb(0, 0, 0);\">config<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">CorsConfiguration<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u652f\u6301\u57df<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">config<\/span>.<span style=\"color: rgb(0, 0, 0);\">addAllowedOriginPattern<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u662f\u5426\u53d1\u9001Cookie<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">config<\/span>.<span style=\"color: rgb(0, 0, 0);\">setAllowCredentials<\/span>(<span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u652f\u6301\u8bf7\u6c42\u65b9\u5f0f<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">config<\/span>.<span style=\"color: rgb(0, 0, 0);\">addAllowedMethod<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u5141\u8bb8\u7684\u539f\u59cb\u8bf7\u6c42\u5934\u90e8\u4fe1\u606f<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">config<\/span>.<span style=\"color: rgb(0, 0, 0);\">addAllowedHeader<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u66b4\u9732\u7684\u5934\u90e8\u4fe1\u606f<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">config<\/span>.<span style=\"color: rgb(0, 0, 0);\">addExposedHeader<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6dfb\u52a0\u5730\u5740\u6620\u5c04<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">UrlBasedCorsConfigurationSource<\/span> <span style=\"color: rgb(0, 0, 0);\">corsConfigurationSource<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">UrlBasedCorsConfigurationSource<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">corsConfigurationSource<\/span>.<span style=\"color: rgb(0, 0, 0);\">registerCorsConfiguration<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\/**\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">config<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">CorsFilter<\/span>(<span style=\"color: rgb(0, 0, 0);\">corsConfigurationSource<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n50\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.4 \u901a\u8fc7Response\u8de8\u57df<\/span><\/h2>\n<p cid=\"n51\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u89e3\u51b3\u8de8\u57df\u95ee\u9898\u6700\u539f\u59cb\u7684\u65b9\u5f0f\uff0c\u652f\u6301\u4efb\u610f\u7248\u672c\u7684Spring Boot\u3002\u4f46\u4e5f\u662f\u5c40\u90e8\u8de8\u57df\uff0c\u4ec5\u652f\u6301\u65b9\u6cd5\u7ea7\u522b\u7684\u8de8\u57df<\/strong><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n52\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RestController<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RequestMapping<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"user\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">UserController<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@PostMapping<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"login\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">login<\/span>(<span style=\"color: rgb(0, 0, 0);\">HttpServletResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">setHeader<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"Access-Control-Allow-Origin\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(170, 17, 17);\">\"\u59d3\u540d\uff1a\u5f20\u4e09\uff1b\u6027\u522b\uff1a\u7537\"<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n53\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.5 \u901a\u8fc7ResponseBodyAdvice\u8de8\u57df<\/span><\/h2>\n<p cid=\"n54\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u901a\u8fc7\u91cd\u5199ResponseBodyAdvice\u63a5\u53e3\u4e2d\u7684beforeBodyWrite\uff08\u8fd4\u56de\u4e4b\u524d\u91cd\u5199\uff09\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5bf9\u6240\u6709\u7684\u63a5\u53e3\u8bbe\u7f6e\u8de8\u57df<\/strong><\/span><\/p>\n<p cid=\"n55\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u4e3a\u5168\u5c40\u8de8\u57df\uff0c\u5bf9\u6574\u4e2a\u9879\u76ee\u4e2d\u7684\u6240\u6709\u63a5\u53e3\u6709\u6548<\/strong><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n56\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@ControllerAdvice<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">CorsResponseBodyAdvice<\/span> <span style=\"color: rgb(119, 0, 136);\">implements<\/span> <span style=\"color: rgb(0, 0, 0);\">ResponseBodyAdvice<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u5185\u5bb9\u662f\u5426\u9700\u8981\u91cd\u5199<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u53ef\u4ee5\u9009\u62e9\u90e8\u5206\u63a7\u5236\u5668\u548c\u65b9\u6cd5\u8fdb\u884c\u91cd\u5199<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* &lt;p&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* true \u91cd\u5199<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Override<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">boolean<\/span> <span style=\"color: rgb(0, 0, 0);\">supports<\/span>(<span style=\"color: rgb(0, 0, 0);\">MethodParameter<\/span> <span style=\"color: rgb(0, 0, 0);\">returnType<\/span>, <span style=\"color: rgb(0, 0, 0);\">Class<\/span> <span style=\"color: rgb(0, 0, 0);\">converterType<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(34, 17, 153);\">true<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Override<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">Object<\/span> <span style=\"color: rgb(0, 0, 0);\">beforeBodyWrite<\/span>(<span style=\"color: rgb(0, 136, 85);\">Object<\/span> <span style=\"color: rgb(0, 0, 0);\">body<\/span>, <span style=\"color: rgb(0, 0, 0);\">MethodParameter<\/span> <span style=\"color: rgb(0, 0, 0);\">returnType<\/span>, <span style=\"color: rgb(0, 0, 0);\">MediaType<\/span> <span style=\"color: rgb(0, 0, 0);\">selectedContentType<\/span>, <span style=\"color: rgb(0, 0, 0);\">Class<\/span> <span style=\"color: rgb(0, 0, 0);\">selectedConverterType<\/span>, <span style=\"color: rgb(0, 0, 0);\">ServerHttpRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">ServerHttpResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u8bbe\u7f6e\u8de8\u57df<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">getHeaders<\/span>().<span style=\"color: rgb(0, 0, 0);\">set<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"Access-Control-Allow-Origin\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">body<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n57\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.6 \u4f7f\u7528\u8fc7\u6ee4\u5668\u8de8\u57df<\/span><\/h2>\n<p cid=\"n73\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5b9e\u73b0\u65b9\u5f0f\u540c3.5\uff0c\u4e0d\u518d\u8d58\u8ff0<\/span><\/p>\n<h1 cid=\"n72\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4 \u539f\u7406<\/span><\/h1>\n<p cid=\"n58\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8de8\u57df\u95ee\u9898\u672c\u8d28\u4e0a\u662f\u6d4f\u89c8\u5668\u7684\u884c\u4e3a\uff0c\u5b83\u7684\u521d\u8877\u662f\u4e3a\u4e86\u4fdd\u8bc1\u7528\u6237\u7684\u8bbf\u95ee\u5b89\u5168\uff0c\u9632\u6b62\u88ab\u6076\u610f\u7f51\u7ad9\u7a83\u53d6\u6570\u636e\u3002\u56e0\u6b64\u89e3\u51b3\u8de8\u57df\u95ee\u9898\u5c31\u53ea\u662f\u9700\u8981\u544a\u8bc9\u6d4f\u89c8\u5668\u8fd9\u662f\u4e00\u4e2a\u5b89\u5168\u7684\u8bf7\u6c42\u5c31\u53ef\u4ee5\u4e86\uff0c\u544a\u8bc9\u6d4f\u89c8\u5668\u201c\u6211\u662f\u81ea\u5df1\u4eba\u201d\u3002<\/span><\/p>\n<p cid=\"n59\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u90a3\u600e\u4e48\u544a\u8bc9\u6d4f\u89c8\u5668\u8fd9\u662f\u4e00\u4e2a\u5b89\u5168\u7684\u8bf7\u6c42\u5462\uff1f\u53ea\u9700\u8981<\/span><span md-inline=\"strong\"><strong><span md-inline=\"plain\">\u5728\u8fd4\u56de\u5934\u4e2d\u8bbe\u7f6e\u201cAccess-Control-Allow-Origin\u201d\u53c2\u6570\u5373\u53ef\u3002\u6b64\u53c2\u6570\u5c31\u662f\u7528\u6765\u8868\u793a\u5141\u8bb8\u8de8\u57df\u8bbf\u95ee\u7684\u539f\u59cb\u57df\u540d\u7684\uff0c\u5f53\u8bbe\u7f6e\u4e3a\u201c<\/span><span md-inline=\"escape\">*<\/span><span md-inline=\"plain\">\u201d\u65f6\uff0c\u8868\u793a\u5141\u8bb8\u6240\u6709\u7ad9\u70b9\u8de8\u57df\u8bbf\u95ee<\/span><\/strong><\/span><\/p>\n<p cid=\"n60\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u672a\u8bbe\u7f6e\u8de8\u57df\u65f6\uff1a<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000647\" data-ratio=\"0.5637181409295352\" data-s=\"300,640\" data-type=\"png\" data-w=\"667\" style=\"height: auto !important;\"  data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151757763.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000647\" data-ratio=\"0.5637181409295352\" data-s=\"300,640\" data-type=\"png\" data-w=\"667\" style=\"height: auto !important;\"  src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151757763.png\"  \/><\/noscript><\/p>\n<p cid=\"n62\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8bbe\u7f6e\u8de8\u57df\u540e\uff1a<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000648\" data-ratio=\"0.562406015037594\" data-s=\"300,640\" data-type=\"png\" data-w=\"665\" style=\"height: auto !important;\"  data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151759114.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000648\" data-ratio=\"0.562406015037594\" data-s=\"300,640\" data-type=\"png\" data-w=\"665\" style=\"height: auto !important;\"  src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151759114.png\"  \/><\/noscript><\/p>\n<hr style=\"box-sizing: content-box;height: 2px;margin-top: 16px;margin-bottom: 16px;border-width: 0px;border-style: none;border-color: initial;background-color: rgb(231, 231, 231);\"  \/>\n<p cid=\"n83\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">CSDN\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/blog.csdn.net\/dkbnull\/article\/details\/138294214<\/span><\/span><\/p>\n<hr style=\"box-sizing: content-box;height: 2px;margin-top: 16px;margin-bottom: 16px;border-width: 0px;border-style: none;border-color: initial;background-color: rgb(231, 231, 231);\"  \/>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u7a0b\u5e8f\u5458null              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u6587\u7ae0\u4e2d\u4ee3\u7801\u4e0d\u4fbf\u4e8e\u9605\u8bfb\uff0c\u8bf7\u4f7f\u7528\u7535\u8111\u67e5\u770b\u6216\u70b9\u51fb\u9605\u8bfb\u539f\u6587\u3002\u6e90\u7801\u8be6\u89c1\uff1a GitHub\uff1ahttps:\/\/github.com\/dkbnu &#8230;<\/p>\n","protected":false},"author":1,"featured_media":4209,"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-4216","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\/2024\/05\/20240524151750224-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151754808.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151750224-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151750224-1024x435.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151754808.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151750224-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151750224-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151750224.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151754808.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151754808.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151756522.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151756522.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151757763.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151757763.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151759114.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151759114.png","id":"image7"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2024-04-29","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":311,"next_post_id":4442,"next_post_title":"Spring Boot\u652f\u6301\u53d1\u9001\u90ae\u4ef6","previous_post_id":3935,"previous_post_title":"springboot\u6574\u5408mqtt\u5b9e\u73b0\u6d88\u606f\u53d1\u9001\u548c\u6d88\u8d39\uff0c\u4ee5\u53ca\u5ba2\u6237\u7aef\u65ad\u7ebf\u91cd\u8fde\u4e4b\u540e\u7684\u6d88\u606f\u6062\u590d","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4216","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=4216"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4216\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/4209"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}