<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>码栈工坊_源代码分享,技术文章,精品素材,网站模板,网站源码,建站源码,模板下载</title><link>https://www.codepub.top/</link><description>代码分享的平台_开源项目_网站模板_网站源码资源下载</description><item><title>异步编程演进史：从回调到Promise再到Async/Await</title><link>https://www.codepub.top/post/658.html</link><description>&lt;section data-tool=&quot;markdown编辑器&quot; data-website=&quot;https://markdown.com.cn/editor&quot; style=&quot;font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0px; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; color: black; padding: 25px 30px; line-height: 1.6; word-break: break-word; overflow-wrap: break-word; text-align: justify; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &amp;quot;PingFang SC&amp;quot;, Cambria, Cochin, Georgia, Times, &amp;quot;Times New Roman&amp;quot;, serif; margin-top: -10px; visibility: visible;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__0&quot;&gt;&lt;h2 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px; margin-bottom: 15px; font-weight: bold; color: black; font-size: 22px; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;导读&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;在早期，操作系统线程是极为昂贵的：一个线程通常需要预留&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;1MB 的虚拟栈空间&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;，创建和销毁都需要消耗不小的内核开销。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;如果一个服务器要处理数千个并发连接，并为每个连接分配一个线程：&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__5 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1, 1, 1); font-weight: 500; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;数千个线程会疯狂消耗物理内存。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1, 1, 1); font-weight: 500; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;内核空间上下文切换（&lt;span class=&quot;&quot;&gt;Context Switch&lt;/span&gt;）会榨干 CPU 周期。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1, 1, 1); font-weight: 500; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;传统的就绪轮询模型（如&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-size: 14px; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: rgb(30, 107, 184); background-color: rgba(27, 31, 35, 0.05); font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;select&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-size: 14px; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: rgb(30, 107, 184); background-color: rgba(27, 31, 35, 0.05); font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;poll&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;）在规模化后面临&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;cursor: pointer; visibility: visible;&quot;&gt;&lt;span data-formula=&quot;O(n)&quot; data-formula-type=&quot;inline-equation&quot; style=&quot;visibility: visible;&quot;&gt;&lt;svg style=&quot;vertical-align: -0.566ex; width: 4.844ex; height: 2.262ex; visibility: visible;&quot; viewbox=&quot;0 -750 2141 1000&quot; aria-hidden=&quot;true&quot; aria-label=&quot;插图&quot;&gt;&lt;g stroke=&quot;currentColor&quot; fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; transform=&quot;scale(1,-1)&quot; style=&quot;visibility: visible;&quot;&gt;&lt;g data-mml-node=&quot;math&quot; style=&quot;visibility: visible;&quot;&gt;&lt;g data-mml-node=&quot;mi&quot; style=&quot;visibility: visible;&quot;&gt;&lt;path data-c=&quot;1D442&quot; d=&quot;M740 435Q740 320 676 213T511 42T304 -22Q207 -22 138 35T51 201Q50 209 50 244Q50 346 98 438T227 601Q351 704 476 704Q514 704 524 703Q621 689 680 617T740 435ZM637 476Q637 565 591 615T476 665Q396 665 322 605Q242 542 200 428T157 216Q157 126 200 73T314 19Q404 19 485 98T608 313Q637 408 637 476Z&quot; style=&quot;visibility: visible;&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;g data-mml-node=&quot;mo&quot; transform=&quot;translate(763,0)&quot; style=&quot;visibility: visible;&quot;&gt;&lt;path data-c=&quot;28&quot; d=&quot;M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z&quot; style=&quot;visibility: visible;&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;g data-mml-node=&quot;mi&quot; transform=&quot;translate(1152,0)&quot; style=&quot;visibility: visible;&quot;&gt;&lt;path data-c=&quot;1D45B&quot; d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; style=&quot;visibility: visible;&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;g data-mml-node=&quot;mo&quot; transform=&quot;translate(1752,0)&quot; style=&quot;visibility: visible;&quot;&gt;&lt;path data-c=&quot;29&quot; d=&quot;M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z&quot; style=&quot;visibility: visible;&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;的性能瓶颈。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;系统大把的时间都浪费在了“管理线程”上，而不是做有用功。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;这就是丹·凯格尔（Dan Kegel）在 1999 年提出的著名的&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span class=&quot;&quot;&gt;C10K 问题&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。为了解决它，技术演进的大幕正式拉开。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;而答案，是以“浪潮”的形式出现的——&lt;/span&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;每一波浪潮都解决了前者的痛点，却也引入了全新的问题。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/section&gt;&lt;p&gt;&lt;section data-tool=&quot;markdown编辑器&quot; data-website=&quot;https://markdown.com.cn/editor&quot; style=&quot;font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0px; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; color: black; padding: 25px 30px; line-height: 1.6; word-break: break-word; overflow-wrap: break-word; text-align: justify; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &amp;quot;PingFang SC&amp;quot;, Cambria, Cochin, Georgia, Times, &amp;quot;Times New Roman&amp;quot;, serif; margin-top: -10px; visibility: visible;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;h2 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px; margin-bottom: 15px; font-weight: bold; color: black; font-size: 22px; visibility: visible;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;第一波浪潮：Callback&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;第一波异步实现的目标极其直接：&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__19 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1, 1, 1); font-weight: 500; visibility: visible;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;不要阻塞线程。&lt;/span&gt;&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1, 1, 1); font-weight: 500; visibility: visible;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;不要一个连接一个线程。&lt;/span&gt;&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1, 1, 1); font-weight: 500; visibility: visible;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__25&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;用事件循环（Event Loop）复用少量线程处理大量连接。&lt;/span&gt;&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;与其等待一个 I/O 操作完成，不如注册一个&lt;span class=&quot;&quot;&gt;回调函数&lt;/span&gt;（Callback），然后线程立刻去处理下一项工作。通过事件循环（如&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-size: 14px; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: rgb(30, 107, 184); background-color: rgba(27, 31, 35, 0.05); font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;epoll&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-size: 14px; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: rgb(30, 107, 184); background-color: rgba(27, 31, 35, 0.05); font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__28&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;kqueue&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;），数千个连接被复用到极少数的线程上。&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;display: block; font-size: 0.9em; overflow: auto; border-left: 3px solid rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.05); color: rgb(106, 115, 125); padding: 10px 10px 10px 20px; margin-bottom: 20px; margin-top: 20px; visibility: visible;&quot; class=&quot;js_darkmode__29&quot;&gt;&lt;p style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; color: black; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__31&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;典型的成功案例：&lt;/span&gt;&lt;/strong&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Node.js&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;凭借单线程处理数千并发构建了庞大的生态；&lt;/span&gt;&lt;strong style=&quot;font-weight: bold; color: black; visibility: visible;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Nginx&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;的事件驱动架构也代替 Apache成为了主流。&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__34&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Callback 成为了第一种广泛使用的方案，它解决了底层的资源饥饿问题，但把排山倒海般的复杂度，转移给了程序结构与开发者。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px; margin-bottom: 15px; font-weight: bold; color: black; font-size: 20px; visibility: visible;&quot; class=&quot;js_darkmode__35&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;1. 控制流被反转（&lt;span class=&quot;&quot;&gt;回调地狱&lt;/span&gt;）&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; line-height: 26px; color: black; visibility: visible;&quot; class=&quot;js_darkmode__36&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;同步代码的业务逻辑通常是线性的：&lt;/span&gt;&lt;code style=&quot;font-size: 14px; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: rgb(30, 107, 184); background-color: rgba(27, 31, 35, 0.05); font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;查用户 -&amp;gt; 查订单 -&amp;gt; 查推荐 -&amp;gt; 渲染页面&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。但在 Callback 写法下，代码会变成一尊“向右生长的金字塔”：&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; visibility: visible;&quot; class=&quot;js_darkmode__38&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 15px 16px 16px; color: rgb(220, 220, 220); display: -webkit-box; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; font-size: 12px; background: rgb(30, 30, 30); border-radius: 5px; visibility: visible;&quot; class=&quot;js_darkmode__39&quot;&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;function&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;loadDashboard&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;userId&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&amp;nbsp; getUser(userId,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, user&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(err)&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;handleError(err);&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; getOrders(user.id,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, orders&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(err)&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;handleError(err);&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; getRecommendations(user.id,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, recommendations&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(err)&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;handleError(err);&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; render(user, orders, recommendations);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br/&gt;&amp;nbsp; &amp;nbsp; });&lt;br/&gt;&amp;nbsp; });&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__40&quot;&gt;读代码时不再是从上到下理解“做什么”，而是不断迫使大脑进入“完成后再做什么”的嵌套逻辑中。&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__41&quot;&gt;2. 错误处理重复且易遗漏&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__42&quot;&gt;每一层回调都要手动、重复地处理错误。一旦某一层漏掉了判断，后续代码拿到&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__43&quot;&gt;undefined&lt;/code&gt;数据继续执行，就会在更远的地方爆出一个莫名其妙的 Bug：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__45&quot;&gt;getOrders(user.id,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, orders&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 如果忘了判断 err，orders 为 undefined，render 就会引发次生灾难&lt;/span&gt;&lt;br/&gt;&amp;nbsp; render(user, orders);&amp;nbsp;&lt;br/&gt;});&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__46&quot;&gt;3. 丢失调用栈排障困难&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__47&quot;&gt;异步回调真正执行时，已经是未来某个事件循环的 Tick 了，早就脱离了原本函数的同步调用栈。此时内部抛出的异常，外部的&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__48&quot;&gt;try/catch&lt;/code&gt;根本接不住：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__49&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__50&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;controller&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;req, res&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; getUser(req.userId,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, user&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 这里的 throw 已经无法被外部的 controller try/catch 捕获了&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;throw&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4EC9B0;line-height: 26px;&quot;&gt;Error&lt;/span&gt;(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;render failed&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; });&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__51&quot;&gt;4. 取消困难&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__52&quot;&gt;当用户打开页面后马上离开，需要取消掉底层正在运行的数据库或网络请求？Callback 无法原生支持。&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__53&quot;&gt;你只能写出类似下面这种打补丁的代码，但这只是笨拙地在应用层“忽略”结果，&lt;span data-pm-slice=&quot;1 1 [&amp;quot;para&amp;quot;,{&amp;quot;tagName&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;attributes&amp;quot;:{&amp;quot;data-tool&amp;quot;:&amp;quot;markdown编辑器&amp;quot;,&amp;quot;data-website&amp;quot;:&amp;quot;https://markdown.com.cn/editor&amp;quot;,&amp;quot;style&amp;quot;:&amp;quot;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: 0px;orphans: auto;text-indent: 0px;text-transform: none;white-space: normal;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;color: black;padding: 25px 30px;line-height: 1.6;word-break: break-word;overflow-wrap: break-word;text-align: justify;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, \&amp;quot;PingFang SC\&amp;quot;, Cambria, Cochin, Georgia, Times, \&amp;quot;Times New Roman\&amp;quot;, serif;margin-top: -10px;&amp;quot;,&amp;quot;data-pm-slice&amp;quot;:&amp;quot;0 0 []&amp;quot;},&amp;quot;namespaceURI&amp;quot;:&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;},&amp;quot;para&amp;quot;,{&amp;quot;tagName&amp;quot;:&amp;quot;p&amp;quot;,&amp;quot;attributes&amp;quot;:{&amp;quot;data-tool&amp;quot;:&amp;quot;markdown.com.cn编辑器&amp;quot;,&amp;quot;style&amp;quot;:&amp;quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&amp;quot;},&amp;quot;namespaceURI&amp;quot;:&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;}]&quot;&gt;仍然浪费了底层资源：&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__54&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__55&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;let&lt;/span&gt;&amp;nbsp;pageActive =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;true&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;loadPage&lt;/span&gt;()&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; getUser(userId,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, user&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(!pageActive)&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 只是手动忽略，底层请求早已跑完&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; renderUser(user);&lt;br/&gt;&amp;nbsp; });&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__56&quot;&gt;5. 并发组合别扭&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__57&quot;&gt;如果页面需要同时加载用户、订单、推荐，三个都完成后再渲染，Callback 写法下你不得不手写一个脆弱的计数状态机：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__58&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__59&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;let&lt;/span&gt;&amp;nbsp;user, orders, recommendations;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;let&lt;/span&gt;&amp;nbsp;done =&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;0&lt;/span&gt;;&amp;nbsp;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;let&lt;/span&gt;&amp;nbsp;failed =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;false&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 需要为 getUser/getOrders/getRecommendations 各写一个回调&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 并小心翼翼地维护 failed 状态、处理重复调用、防止 render 被多次触发……&lt;/span&gt;&lt;br/&gt;getUser(userId,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, result&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(err) { failed =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;true&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;; }&lt;br/&gt;&amp;nbsp; user = result;&lt;br/&gt;&amp;nbsp; finish();&lt;br/&gt;});&lt;br/&gt;&lt;br/&gt;getOrders(userId,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, result&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(err) { failed =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;true&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;; }&lt;br/&gt;&amp;nbsp; orders = result;&lt;br/&gt;&amp;nbsp; finish();&lt;br/&gt;});&lt;br/&gt;&lt;br/&gt;getRecommendations(userId,&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err, result&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(err) { failed =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;true&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;; }&lt;br/&gt;&amp;nbsp; recommendations = result;&lt;br/&gt;&amp;nbsp; finish();&lt;br/&gt;});&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;finish&lt;/span&gt;()&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(failed)&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;handleError();&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(++done ===&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;3&lt;/span&gt;) render(user, orders, recommendations);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__60&quot;&gt;阶段总结：Callback 的得与失&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__61 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__62&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__63&quot;&gt;解决了：&lt;/strong&gt;摆脱了“一连接一线程”的资源枯竭危机。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__64&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__65&quot;&gt;代价是：&lt;/strong&gt;控制流反转、错误处理碎片化、嵌套无底洞、取消困难、并发组合复杂，调试和维护成本极高。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__66&quot;&gt;性能问题解决了，但程序结构的复杂度被转移给了开发者。&lt;/p&gt;&lt;/section&gt;&lt;section data-tool=&quot;markdown编辑器&quot; data-website=&quot;https://markdown.com.cn/editor&quot; style=&quot;font-size: 16px;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: 0px;orphans: auto;text-indent: 0px;text-transform: none;white-space: normal;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;color: black;padding: 25px 30px;line-height: 1.6;word-break: break-word;overflow-wrap: break-word;text-align: justify;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &amp;quot;PingFang SC&amp;quot;, Cambria, Cochin, Georgia, Times, &amp;quot;Times New Roman&amp;quot;, serif;margin-top: -10px;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__67&quot;&gt;&lt;h2 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 22px;&quot; class=&quot;js_darkmode__68&quot;&gt;第二波浪潮：Promises&lt;/h2&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__69&quot;&gt;为了修复 Callback 最痛的几个体验，2010 年代迎来了&amp;nbsp;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__70&quot;&gt;Promises / Futures&lt;/strong&gt;。它把嵌套回调拉平成链式调用，把错误处理集中到&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__71&quot;&gt;.catch()&lt;/code&gt;，并把“未来才会有的结果”包装成了一个可传递、可组合的&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__72&quot;&gt;一等公民值（Value）&lt;/strong&gt;。&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__73&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__74&quot;&gt;getUser(userId)&lt;br/&gt;&amp;nbsp; .then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;user&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;getOrders(user.id).then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;orders&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;[user, orders]))&lt;br/&gt;&amp;nbsp; .then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;[user, orders]&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;render(user, orders))&lt;br/&gt;&amp;nbsp; .catch(handleError);&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__75&quot;&gt;这确实是一个巨大的进步，但又引出了新的问题：&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__76&quot;&gt;1. 语义是“一次性”的，无法表达持续事件&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__77&quot;&gt;Promise 的核心语义是：&lt;em style=&quot;font-style: italic;color: black;&quot; class=&quot;js_darkmode__78&quot;&gt;未来某个时间点，得到一个结果或错误，且只完成一次&lt;/em&gt;。&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__79&quot;&gt;这完美契合一次性的 HTTP 请求，但在面对&amp;nbsp;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__80&quot;&gt;WebSocket、消息队列、文件流、UI 点击事件&lt;/strong&gt;这种需要持续产生、处理消息的场景时，Promise 熄火了。&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__81&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__82&quot;&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 强行用 Promise 表达 WebSocket，代码会变得无比别扭&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;receiveNextMessage&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;socket&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: #4EC9B0;line-height: 26px;&quot;&gt;Promise&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;resolve, reject&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; socket.onmessage =&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;event&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;resolve(event.data);&lt;br/&gt;&amp;nbsp; &amp;nbsp; socket.onerror =&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;reject(err);&lt;br/&gt;&amp;nbsp; });&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 为了持续监听，纯 Promise 时代必须展开“无限递归”&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;startListening&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;socket&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; receiveNextMessage(socket)&lt;br/&gt;&amp;nbsp; &amp;nbsp; .then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;msg&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4EC9B0;line-height: 26px;&quot;&gt;console&lt;/span&gt;.log(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;收到消息:&amp;quot;&lt;/span&gt;, msg);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 别扭核心：为了听下一条，必须在 .then() 里面递归调用自己&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 这会创建一条无限延伸的 Promise 隐式链条&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;startListening(socket);&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp; })&lt;br/&gt;&amp;nbsp; &amp;nbsp; .catch(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4EC9B0;line-height: 26px;&quot;&gt;console&lt;/span&gt;.error(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;连接出错，监听终止:&amp;quot;&lt;/span&gt;, err);&lt;br/&gt;&amp;nbsp; &amp;nbsp; });&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__83&quot;&gt;这导致异步世界发生了&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__84&quot;&gt;生态分裂&lt;/strong&gt;：请求响应派用 Promise，持续流派依然只能求助于 EventEmitter、Observable 或传统的 Callback。&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__85&quot;&gt;2. 混合复杂业务场景时，组合依然别扭&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__86&quot;&gt;一旦遇到稍微复杂的现实业务（如：&lt;em style=&quot;font-style: italic;color: black;&quot; class=&quot;js_darkmode__87&quot;&gt;先查用户 -&amp;gt; VIP 则同时查订单和推荐，非 VIP 只查订单 -&amp;gt; 推荐失败可降级，订单失败则全盘失败&lt;/em&gt;），Promise 链就会重新退化成难以直观阅读的函数式组合怪物：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__88&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__89&quot;&gt;getUser(userId)&lt;br/&gt;&amp;nbsp; .then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;user&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(user.isVip) {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #4EC9B0;line-height: 26px;&quot;&gt;Promise&lt;/span&gt;.all([&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getOrders(user.id),&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getRecommendations(user.id).catch(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;{ logWarn(err);&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[]; }),&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ]).then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;[orders, recommendations]&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;({ user, orders, recommendations }));&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 为了向下传递数据，需要不断在每个 .then() 里手动包装和转发对象...&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;getOrders(user.id).then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;orders&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;({ user, orders,&amp;nbsp;&lt;span style=&quot;color: #9CDCFE;line-height: 26px;&quot;&gt;recommendations&lt;/span&gt;: []}));&lt;br/&gt;&amp;nbsp; })&lt;br/&gt;&amp;nbsp; .then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;{ user, orders, recommendations }&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;{ render(user, orders, recommendations);})&lt;br/&gt;&amp;nbsp; .catch(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;{ logError(err); renderErrorPage(err);});&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__90&quot;&gt;3. 断链带来的“吞错”与延迟暴露&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__91&quot;&gt;Promise 的错误处理高度依赖链路的完整性。如果在链条的某个闭包中漏掉了&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__92&quot;&gt;return&lt;/code&gt;，整条链条就会悄然断裂：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__93&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__94&quot;&gt;doA().then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;()&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; doB();&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 致命错误：忘了写 return 开启新 Promise&amp;nbsp;&lt;/span&gt;&lt;br/&gt;}).then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;()&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; doC();&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 这里不会等待 doB 完成，直接与 doB 并发执行了！&lt;/span&gt;&lt;br/&gt;}).catch(handleError);&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 此时 doB 内部如果发生异步失败，catch 根本接不住！&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__95&quot;&gt;4. 返回值类型的分裂（&lt;span style=&quot;font-style: italic;&quot;&gt;T&lt;/span&gt;&amp;nbsp;vs Promise &amp;lt;&lt;span style=&quot;font-style: italic;&quot;&gt;T&lt;/span&gt;&amp;gt;）&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__96&quot;&gt;一个原本同步的函数，一旦调整成了异步，它的返回值就从普通的&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__97&quot;&gt;T&lt;/code&gt;变成了&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__98&quot;&gt;Promise&amp;lt;T&amp;gt;&lt;/code&gt;。&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__99&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__100&quot;&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 同步函数&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;getUserName&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;user&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;user.name; }&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;name = getUserName(user);&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 异步函数&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;getUserName&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;userId&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;fetchUser(userId).then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;user&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;user.name);&lt;br/&gt;}&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;namePromise = getUserName(userId);&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__101&quot;&gt;这种类型的变化就像病毒一样：调用方必须明确知道自己拿到的是普通值还是 Promise。&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__102&quot;&gt;一旦底层函数由同步变异步，会顺着调用链向上引全链重写。&lt;/strong&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__103&quot;&gt;5.&amp;nbsp;&lt;code&gt;Promise.all&lt;/code&gt;的失败语义不总是符合业务&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__104&quot;&gt;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__105&quot;&gt;Promise.all&lt;/code&gt;的语义是：&lt;em style=&quot;font-style: italic;color: black;&quot; class=&quot;js_darkmode__106&quot;&gt;全部成功才成功，任意一个失败就整体失败&lt;/em&gt;。&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__107&quot;&gt;这很适合“缺一不可”的强绑定场景，但在真实的电商首页等聚合业务中，通常是：&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__108&quot;&gt;订单必须成功，推荐/广告/优惠券可以容忍失败或降级&lt;/code&gt;。如果直接套用&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__109&quot;&gt;Promise.all&lt;/code&gt;，任何一个非核心微服务抖动，都会导致整张页面死锁崩溃。&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__110&quot;&gt;为了让它合规，开发者不得不为每一个子项手动编写&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__111&quot;&gt;.catch()&lt;/code&gt;防御：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__112&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__113&quot;&gt;&lt;span style=&quot;color: #4EC9B0;line-height: 26px;&quot;&gt;Promise&lt;/span&gt;.all([&lt;br/&gt;&amp;nbsp; getOrders(userId),&lt;br/&gt;&amp;nbsp; getRecommendations(userId).catch(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;()&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;[]),&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 失败容降级&lt;/span&gt;&lt;br/&gt;&amp;nbsp; getAds(userId).catch(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;()&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;null&lt;/span&gt;),&lt;br/&gt;&amp;nbsp; getCoupons(userId).catch(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;err&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; logWarn(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;coupon failed&amp;quot;&lt;/span&gt;, err);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[];&lt;br/&gt;&amp;nbsp; }),&lt;br/&gt;]).then(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;[orders, recommendations, ads, coupons]&lt;/span&gt;) =&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; render({ orders, recommendations, ads, coupons });&lt;br/&gt;});&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__114&quot;&gt;这意味着，控制并发与处理局部失败的底层复杂度，依然完完整整地留给了开发者。&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__115&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;h2 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 22px;&quot; class=&quot;js_darkmode__116&quot;&gt;第三波浪潮：Async/Await&lt;/h2&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__117&quot;&gt;为了消灭 Promise 链式调用的语法噪音，&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__118&quot;&gt;async/await&lt;/code&gt;横空出世。它最大的功绩，是&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__119&quot;&gt;让异步代码重新长得像同步代码一样&lt;/strong&gt;。&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__120&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__121&quot;&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 重新找回了人类最习惯的顺序感&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;loadDashboard&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;userId&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;user =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;getUser(userId);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;orders =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;getOrders(user.id);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;render(user, orders);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__122&quot;&gt;异常能用标准&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__123&quot;&gt;try/catch&lt;/code&gt;了，变量绑定也自然了。然而，&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__124&quot;&gt;这种“看起来像同步”的优点，恰恰成为了开发中危险的隐式陷阱。&lt;/strong&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__125&quot;&gt;1. 陷阱：将并发悄然降级为串行&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__126&quot;&gt;请紧盯下面这段看起来非常干净、漂亮的代码：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__127&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__128&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;loadDashboard&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;userId&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;user =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;getUser(userId);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;orders =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;getOrders(user.id);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;recommendations =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;getRecommendations(user.id);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;render(user, orders, recommendations);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__129&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__130&quot;&gt;看出来问题了吗？&lt;/strong&gt;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__131&quot;&gt;orders&lt;/code&gt;和&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__132&quot;&gt;recommendations&lt;/code&gt;之间明明没有任何依赖关系，它们本可以并行运行！&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__133&quot;&gt;但因为连续写了两个&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__134&quot;&gt;await&lt;/code&gt;，执行流被强行变成了&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__135&quot;&gt;阻塞串行&lt;/strong&gt;。如果订单接口耗时 300ms，推荐接口耗时 400ms，该函数的总耗时会从并行的&amp;nbsp;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__136&quot;&gt;400ms&lt;/strong&gt;飙升到&amp;nbsp;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__137&quot;&gt;700ms&lt;/strong&gt;！&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__138&quot;&gt;在服务端高并发场景下，这种隐藏的串行会被无限放大，最终表现为系统的吞吐雪崩。&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__139&quot;&gt;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__140&quot;&gt;async/await&lt;/code&gt;绝不会自动分析并发关系&lt;/strong&gt;，为了压榨性能，你必须手动打破顺序风格，重新缝合 Promise：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__141&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__142&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;[orders, recommendations] =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4EC9B0;line-height: 26px;&quot;&gt;Promise&lt;/span&gt;.all([&lt;br/&gt;&amp;nbsp; getOrders(user.id),&lt;br/&gt;&amp;nbsp; getRecommendations(user.id),&lt;br/&gt;]);&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__143&quot;&gt;代码一旦变复杂，优雅的顺序流就会再次被割裂。&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__144&quot;&gt;2. 异步会沿调用链“着色扩散”&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__145&quot;&gt;在 Async/await 的世界里，函数被无形地分成了两种颜色：&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__146&quot;&gt;同步是蓝色，异步是红色。&lt;/strong&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__147 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__148&quot;&gt;红色（async）函数可以调用蓝色函数。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__149&quot;&gt;蓝色（sync）函数&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__150&quot;&gt;绝不能&lt;/strong&gt;直接调用红色函数并拿到结果。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__151&quot;&gt;这导致了极其恐怖的&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__152&quot;&gt;病毒式扩散&lt;/strong&gt;：底层引入的一行小小的 I/O 修改，会顺着调用图一路上溯，迫使上游几十个文件的函数签名全部被迫加上&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__153&quot;&gt;async/await&lt;/code&gt;。&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__154&quot;&gt;这种分裂甚至绑架了整个语言生态：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__155 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__156&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__157&quot;&gt;Python：&lt;/strong&gt;生态直接分裂成同步客户端&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__158&quot;&gt;requests&lt;/code&gt;和异步客户端&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__159&quot;&gt;aiohttp&lt;/code&gt;。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__160&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__161&quot;&gt;Rust：&lt;/strong&gt;围绕 Tokio、async-std 等互不兼容的运行时发生碎片化，库作者不得不为了两套生态维护两套完全一样的 API 矩阵。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__162&quot;&gt;3. 误以为&amp;nbsp;&lt;code&gt;await&lt;/code&gt;能让阻塞变非阻塞&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__163&quot;&gt;很多人存在一个致命误解：&lt;em style=&quot;font-style: italic;color: black;&quot; class=&quot;js_darkmode__164&quot;&gt;只要函数前面写了&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__165&quot;&gt;async&lt;/code&gt;，里面的代码就不会阻塞执行。&lt;/em&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__166&quot;&gt;大错特错！&lt;/strong&gt;&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__167&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__168&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;handleRequest&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;req&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;user =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;getUser(req.userId);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// CPU 密集计算，仍然会死死锁住单线程的事件循环&lt;/span&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;report = heavyCpuReport(user);&amp;nbsp;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;report;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__169&quot;&gt;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__170&quot;&gt;await&lt;/code&gt;解决的是&amp;nbsp;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__171&quot;&gt;I/O 等待&lt;/strong&gt;的表达问题，它对&amp;nbsp;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__172&quot;&gt;CPU 密集型调度&lt;/strong&gt;毫无帮助。在单线程模型里跑高密度计算，依然会引发全盘卡顿，你依然需要求助于 Worker Thread 或独立的进程池。&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__173&quot;&gt;4.&amp;nbsp;&lt;code&gt;await&lt;/code&gt;会制造交错点，共享状态可能在中途改变&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__174&quot;&gt;同步代码天然具有原子性的表象，但在&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__175&quot;&gt;async/await&lt;/code&gt;中，&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__176&quot;&gt;每一个&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__177&quot;&gt;await&lt;/code&gt;关键字都是一个让出 CPU 执行权的“出让点”&lt;/strong&gt;：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__178&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__179&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;transfer&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;account, amount&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(account.balance &amp;gt;= amount) {&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;audit(account.id, amount);&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 让出点！在等待期间，其他任务可能进来把余额扣光了&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; account.balance -= amount; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 恢复执行：此时余额已处于非预期的透支状态&lt;/span&gt;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__180&quot;&gt;每个&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__181&quot;&gt;await&lt;/code&gt;之后，状态可能已经变了。这要求开发者在处理共享状态时，必须打起十二分精神去处理并发锁或本地状态快照。&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__182&quot;&gt;5. 持锁 await 会带来死锁风险&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__183&quot;&gt;如果在持有并发锁的期间&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__184&quot;&gt;await&lt;/code&gt;了一个耗时极长的 I/O，整个系统的进度可能会直接陷入死锁（Futurelocks）。&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__185&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__186&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;updateUser&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;userId&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;lock.acquire(userId);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;try&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;user =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;getUser(userId);&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 任务 A 拿着锁等待 I/O，任务 B 想拿同一把锁 =&amp;gt; 任务 B 被完全阻塞&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; user.name =&amp;nbsp;&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;new name&amp;quot;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;saveUser(user);&lt;br/&gt;&amp;nbsp; }&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;finally&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; lock.release(userId);&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 如果异步挂起、取消、异常处理不当，锁可能长期无法释放&lt;/span&gt;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__187&quot;&gt;6. 取消和超时仍然不是自然的&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__188&quot;&gt;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__189&quot;&gt;async/await&lt;/code&gt;让等待的写法好看了，但它并没有在底层自动解决“请求取消”的逻辑。以常见的前端连续搜索为例：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__190&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__191&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;search&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;keyword&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;result =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;fetch(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;`/api/search?q=&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;${keyword}&lt;/span&gt;`&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; render(&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;result.json());&lt;br/&gt;}&lt;br/&gt;search(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;a&amp;quot;&lt;/span&gt;); search(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;ab&amp;quot;&lt;/span&gt;); search(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;abc&amp;quot;&lt;/span&gt;);&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__192&quot;&gt;如果三个请求同时发出，由于网络波动，返回顺序可能是：&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__193&quot;&gt;abc(最新)&lt;/code&gt;先返回并渲染，而&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__194&quot;&gt;a(最旧)&lt;/code&gt;后返回。&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__195&quot;&gt;旧的数据会无情地覆盖掉最新的正确结果。&lt;/strong&gt;&lt;/p&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__196&quot;&gt;为了修复这个竞态 Bug，你必须显式引入极为繁琐的&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__197&quot;&gt;AbortController&lt;/code&gt;链条：&lt;/p&gt;&lt;pre data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;&quot; class=&quot;js_darkmode__198&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 15px 16px 16px;color: rgb(220, 220, 220);display: -webkit-box;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(30, 30, 30);border-radius: 5px;&quot; class=&quot;js_darkmode__199&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;let&lt;/span&gt;&amp;nbsp;currentController;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;search&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;keyword&lt;/span&gt;)&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(currentController) currentController.abort();&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 取消上一次未完成的请求&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;controller =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;AbortController();&lt;br/&gt;&amp;nbsp; currentController = controller;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;try&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;result =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;fetch(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;`/api/search?q=&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;${keyword}&lt;/span&gt;`&lt;/span&gt;, {&amp;nbsp;&lt;span style=&quot;color: #9CDCFE;line-height: 26px;&quot;&gt;signal&lt;/span&gt;: controller.signal });&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;const&lt;/span&gt;&amp;nbsp;data =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;result.json();&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(currentController === controller) { render(data); }&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 确保是最新的才渲染&lt;/span&gt;&lt;br/&gt;&amp;nbsp; }&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;catch&lt;/span&gt;(err) {&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 还需要额外处理由 abort 触发的异常...&lt;/span&gt;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__200&quot;&gt;只要中间任何一层的协同调用忘了传递&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__201&quot;&gt;signal&lt;/code&gt;，整条取消链就会瞬间断裂。&lt;/p&gt;&lt;h3 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;&quot; class=&quot;js_darkmode__202&quot;&gt;7. 并发错误语义仍然复杂&lt;/h3&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__203&quot;&gt;&lt;span style=&quot;caret-color: #000000;color: #000000;font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: auto;text-align: start;text-indent: 0px;text-transform: none;widows: auto;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__204&quot;&gt;&lt;span data-test-id=&quot;luminous-expanded-bubble&quot;&gt;错误处理看似回到了&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__205&quot;&gt;try/catch&lt;/code&gt;，但当你面对由&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__206&quot;&gt;Promise.all&lt;/code&gt;聚合的并发任务时，&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__207&quot;&gt;try/catch&lt;/code&gt;依然无法替你做决定：&lt;em style=&quot;font-style: italic;color: black;&quot; class=&quot;js_darkmode__208&quot;&gt;哪些子项错误是致命的？哪些是可以降级或重试的？&lt;/em&gt;复杂的异步边界处理，依旧逃不掉。&lt;/p&gt;&lt;/section&gt;&lt;section data-tool=&quot;markdown编辑器&quot; data-website=&quot;https://markdown.com.cn/editor&quot; style=&quot;font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0px; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; color: black; padding: 25px 30px; line-height: 1.6; word-break: break-word; overflow-wrap: break-word; text-align: justify; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &amp;quot;PingFang SC&amp;quot;, Cambria, Cochin, Georgia, Times, &amp;quot;Times New Roman&amp;quot;, serif; margin-top: -10px; margin-bottom: 0px;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__209&quot;&gt;&lt;h2 data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: black;font-size: 22px;&quot; class=&quot;js_darkmode__210&quot;&gt;尾声：未来的第四波浪潮在哪？&lt;/h2&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__211&quot;&gt;回顾这二十年的技术演进，会发现一个清晰却有些无奈的规律：&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr style=&quot;border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(204, 204, 204) currentcolor currentcolor;border-image: none;background-color: white;&quot; class=&quot;js_darkmode__212 firstRow&quot;&gt;&lt;th style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;font-weight: bold;background-color: rgb(240, 240, 240);&quot; class=&quot;js_darkmode__213&quot;&gt;&lt;section&gt;异步浪潮&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;font-weight: bold;background-color: rgb(240, 240, 240);&quot; class=&quot;js_darkmode__214&quot;&gt;&lt;section&gt;解决的核心痛点&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;font-weight: bold;background-color: rgb(240, 240, 240);&quot; class=&quot;js_darkmode__215&quot;&gt;&lt;section&gt;引入的新成本&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(204, 204, 204) currentcolor currentcolor;border-image: none;background-color: white;&quot; class=&quot;js_darkmode__216&quot;&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__217&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__218&quot;&gt;Callback&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__219&quot;&gt;&lt;section&gt;摆脱“一连接一线程”的资源枯竭&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__220&quot;&gt;&lt;section&gt;控制流反转、调用栈丢失、回调地狱&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(204, 204, 204) currentcolor currentcolor;border-image: none;background-color: rgb(248, 248, 248);&quot; class=&quot;js_darkmode__221&quot;&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__222&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__223&quot;&gt;Promises&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__224&quot;&gt;&lt;section&gt;拉平嵌套、集中错误处理、值化数据依赖&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__225&quot;&gt;&lt;section&gt;一次性语义限制流场景、断链吞错、类型分裂&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(204, 204, 204) currentcolor currentcolor;border-image: none;background-color: white;&quot; class=&quot;js_darkmode__226&quot;&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__227&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__228&quot;&gt;Async/Await&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__229&quot;&gt;&lt;section&gt;恢复线性可读性、异常处理自然化&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;&quot; class=&quot;js_darkmode__230&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__231&quot;&gt;顺序陷阱（并发劣化）、函数着色税、交错状态风暴、死锁与取消断链风险&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__232&quot;&gt;每一波浪潮都让“编写单个异步函数”的局部体验变得完美，却让“维护大型代码库、保障并发性能”的全局体验变得复杂。正因为看清了 Async/await 带来的高昂代价，许多现代语言设计者开始坚定地拒绝这一路线，选择在运行时或编译器层面绕道而行：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__233 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__234&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__235&quot;&gt;Go 语言：&lt;/strong&gt;坚守&amp;nbsp;&lt;code style=&quot;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__236&quot;&gt;goroutine&lt;/code&gt;，将复杂度收拢进更重的运行时，换取&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__237&quot;&gt;完全无函数着色&lt;/strong&gt;、天生支持顺序写法的并发世界。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__238&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__239&quot;&gt;Java (Project Loom)：&lt;/strong&gt;在 Java 21 中引入&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__240&quot;&gt;虚拟线程（Virtual Threads）&lt;/strong&gt;，让轻量级线程具有和常规传统线程一模一样的行为，代码不需要做任何红蓝颜色的改变。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;&quot; class=&quot;js_darkmode__241&quot;&gt;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__242&quot;&gt;Zig 语言：&lt;/strong&gt;从编译器层面切掉 async/await 关键字，转而围绕 I/O 接口参数进行重建，使其降级为普通的库函数。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;markdown.com.cn编辑器&quot; style=&quot;font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;line-height: 26px;color: black;&quot; class=&quot;js_darkmode__243&quot;&gt;从回调到 Promise 再到 Async/await，那些从问&amp;nbsp;&lt;strong style=&quot;font-weight: bold;color: black;&quot; class=&quot;js_darkmode__244&quot;&gt;“我们如何管理并发执行？”&lt;/strong&gt;开始的方法，似乎不断在抽象层的每个级别产生新问题。高并发这场战争依然漫长，永远不要把并发的复杂性，寄托在某一个简单的关键字糖衣之上。&lt;/p&gt;&lt;/section&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 20 Aug 2026 09:50:58 +0800</pubDate></item><item><title>.NET 高级调试技术：超越基础 Dump 分析</title><link>https://www.codepub.top/post/657.html</link><description>&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(239, 112, 96); margin: 30px 0px 15px; padding: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none none solid; border-width: 1px 1px 2px; border-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow: unset; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__0&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #FFFFFF; background: none 0% 0% / auto no-repeat scroll padding-box border-box #EF7060; line-height: 1.5em; letter-spacing: 0em; align-items: unset; border-style: none; border-width: 1px; border-color: #000000; border-radius: 3px 3px 0px 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin: 0px 5px 0px 0px; overflow: unset; padding: 3px 10px 1px; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;引言&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;在 .NET 生产环境调试领域，使用 WinDbg 和 PerfView 进行基础的 Dump 分析只是入门。随着应用程序复杂度的增加——尤其是与非托管代码的互操作、async/await 模式和跨平台部署——开发人员需要更高级的技术来诊断和解决最具挑战性的问题。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;本文综合了实际场景中的调试经验和高级技术，涵盖非托管句柄泄露、终结器队列瓶颈、线程同步内部机制、Harmony 运行时补丁以及跨平台调试策略。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;margin: 10px 0px; padding: 0px; border-style: solid none none; border-width: 1px 3px 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 0px; background: none left top / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: 1px; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(239, 112, 96); margin: 30px 0px 15px; padding: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none none solid; border-width: 1px 1px 2px; border-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow: unset; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #FFFFFF; background: none 0% 0% / auto no-repeat scroll padding-box border-box #EF7060; line-height: 1.5em; letter-spacing: 0em; align-items: unset; border-style: none; border-width: 1px; border-color: #000000; border-radius: 3px 3px 0px 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin: 0px 5px 0px 0px; overflow: unset; padding: 3px 10px 1px; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;第一章：非托管句柄泄露检测&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #000000; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;1.1 非托管互操作的隐藏威胁&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;当 C# 程序通过 P/Invoke 与 C++ 交互时，就进入了&amp;quot;非托管泥潭&amp;quot;。即使是一个简单的 C++ 调用也可能引入从托管代码角度几乎不可见的句柄泄露问题。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0); font-weight: bold; background: none left top / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;场景&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：C# 应用调用一个创建 Event 句柄但从未关闭它的 C++ 原生方法：&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin: 10px 0px; padding: 0px; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 15px 16px 16px; color: rgb(56, 58, 66); background: rgb(250, 250, 250); border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;extern&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #50A14F; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;quot;C&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; _declspec(dllexport)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #4078F2; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;CSharpCreateEvent&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;color: #4078F2; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;include&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #50A14F; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;lt;Windows.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #4078F2; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;CSharpCreateEvent&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; HANDLE hEvent = CreateEvent(&lt;/span&gt;&lt;span style=&quot;color: #0184BB; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;NULL&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;, TRUE, FALSE,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0184BB; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;NULL&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #C18401; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;printf&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #50A14F; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;quot;\nEvent句柄值: %&lt;a class=&quot;wx_topic_link&quot; style=&quot;color: rgb(87, 107, 149) !important; visibility: visible;&quot; data-topic=&quot;1&quot; data-recommend=&quot;&quot;&gt;#08x&lt;/a&gt;\t&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;, hEvent);&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #A0A1A7; font-style: italic; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;// 缺失: CloseHandle(hEvent);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;C# 调用方：&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin: 10px 0px; padding: 0px; visibility: visible;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 15px 16px 16px; color: rgb(56, 58, 66); background: rgb(250, 250, 250); border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__19&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;internal&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #4078F2; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Program&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #4078F2; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;DllImport(&lt;/span&gt;&lt;span style=&quot;color: #50A14F; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;quot;Example.dll&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;, CallingConvention = CallingConvention.Cdecl)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;extern&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;static&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #4078F2; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;CSharpCreateEvent&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;static&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__25&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #4078F2; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Main&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;[] args&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #A626A4; line-height: 26px; visibility: visible;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;while&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span style=&quot;color: #0184BB; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;) {&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Task.Run(() =&amp;gt; CSharpCreateEvent());&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thread.Sleep(&lt;/span&gt;&lt;span style=&quot;color: #986801; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #000000; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot; class=&quot;js_darkmode__28&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;1.2 使用 WinDbg 识别泄露的句柄&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__29&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;使用&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;!handle&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;命令检查句柄类型和数量：&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin: 10px 0px; padding: 0px; visibility: visible;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 15px 16px 16px; color: rgb(56, 58, 66); background: rgb(250, 250, 250); border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__31&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;0:004&amp;gt; !handle&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Handle 16fc&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Event&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;1411 Handles&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Count&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;None &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;Event &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1337 &amp;nbsp;&amp;lt;- 异常高！&lt;br/&gt;File &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16&lt;br/&gt;Directory &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;br/&gt;Mutant &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;br/&gt;...&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__32&quot;&gt;1.3 使用 !htrace 追踪句柄分配&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;code style=&quot;&quot;&gt;!htrace&lt;/code&gt;&amp;nbsp;命令启用句柄追踪并比较快照以找到泄露的句柄：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__34&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__35&quot;&gt;0:011&amp;gt; !htrace -&lt;span style=&quot;color: #c18401;line-height: 26px;&quot;&gt;enable&lt;/span&gt;&lt;br/&gt;Handle tracing enabled.&lt;br/&gt;Handle tracing information snapshot successfully taken.&lt;br/&gt;&lt;br/&gt;0:011&amp;gt; g&lt;br/&gt;(一段时间后中断)&lt;br/&gt;&lt;br/&gt;0:007&amp;gt; !htrace -diff&lt;br/&gt;Handle tracing information snapshot successfully taken.&lt;br/&gt;0xad new stack traces since the previous snapshot.&lt;br/&gt;Outstanding handles opened since the previous snapshot:&lt;br/&gt;--------------------------------------&lt;br/&gt;Handle = 0x0000199c - OPEN&lt;br/&gt;Thread ID = 0x000017c8, Process ID = 0x00000e14&lt;br/&gt;...&lt;br/&gt;0x770e2b04: KERNELBASE!CreateEventW+0x00000024&lt;br/&gt;0x6ac91755: Example_20_1_5!CSharpCreateEvent+0x00000035&lt;br/&gt;--------------------------------------&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__36&quot;&gt;1.4 结合断点与托管栈检查&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__37&quot;&gt;在原生方法上设置断点并捕获托管调用栈：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__38&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__39&quot;&gt;0:007&amp;gt; bp Example_20_1_5!CSharpCreateEvent&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;k; gc&amp;quot;&lt;/span&gt;&lt;br/&gt;0:007&amp;gt; g&lt;br/&gt;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;# ChildEBP RetAddr &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br/&gt;00 0848f9e4 080674f3 &amp;nbsp; &amp;nbsp; Example_20_1_5!CSharpCreateEvent&lt;br/&gt;02 0848f9f0 0806e3dd &amp;nbsp; &amp;nbsp; Example_20_1_4!Program.&amp;lt;&amp;gt;c.&amp;lt;Main&amp;gt;b__1_0+0x1b&lt;br/&gt;03 0848f9fc 0806e38d &amp;nbsp; &amp;nbsp; System_Private_CoreLib!Task.InnerInvoke+0x3d&lt;br/&gt;...&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__40&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__41&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__42&quot;&gt;第二章：终结器队列瓶颈&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__43&quot;&gt;2.1 理解终结器内存泄露&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__44&quot;&gt;终结器队列是内存泄露的常见来源。当带析构函数的对象创建速度超过单个终结器线程的处理速度时，内存就会累积。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__45&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__46&quot;&gt;场景&lt;/strong&gt;：一个具有慢速析构函数的类：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__47&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__48&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__49&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__50&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;Person&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__51&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__52&quot;&gt;string&lt;/span&gt;&amp;nbsp;Name {&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__53&quot;&gt;get&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__54&quot;&gt;set&lt;/span&gt;; }&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__55&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__56&quot;&gt;int&lt;/span&gt;&amp;nbsp;Age {&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__57&quot;&gt;get&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__58&quot;&gt;set&lt;/span&gt;; }&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp; ~Person() {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thread.Sleep(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__59&quot;&gt;new&lt;/span&gt;&amp;nbsp;Random().Next(&lt;span style=&quot;color: #986801;line-height: 26px;&quot;&gt;0&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #986801;line-height: 26px;&quot;&gt;3000&lt;/span&gt;)); &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 慢速终结&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;$&amp;quot;name=&lt;span style=&quot;color: #e45649;line-height: 26px;&quot;&gt;{Name}&lt;/span&gt;&amp;nbsp;finalized...&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 创建对象的速度超过终结速度&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__60&quot;&gt;for&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__61&quot;&gt;int&lt;/span&gt;&amp;nbsp;i =&amp;nbsp;&lt;span style=&quot;color: #986801;line-height: 26px;&quot;&gt;0&lt;/span&gt;; i &amp;lt;&amp;nbsp;&lt;span style=&quot;color: #986801;line-height: 26px;&quot;&gt;1000000&lt;/span&gt;; i++) {&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__62&quot;&gt;var&lt;/span&gt;&amp;nbsp;person =&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__63&quot;&gt;new&lt;/span&gt;&amp;nbsp;Person { Name =&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;$&amp;quot;jack&lt;span style=&quot;color: #e45649;line-height: 26px;&quot;&gt;{i}&lt;/span&gt;&amp;quot;&lt;/span&gt;, Age = i };&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__64&quot;&gt;2.2 诊断终结器队列积压&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__65&quot;&gt;在 WinDbg 中使用&amp;nbsp;&lt;code style=&quot;&quot;&gt;!fq&lt;/code&gt;（终结器队列）命令：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__66&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__67&quot;&gt;0:015&amp;gt; !fq&lt;br/&gt;SyncBlocks to be cleaned up: 0&lt;br/&gt;Free-Threaded Interfaces to be released: 0&lt;br/&gt;----------------------------------&lt;br/&gt;generation 0 has 28423 finalizable objects&lt;br/&gt;generation 1 has 4 finalizable objects&lt;br/&gt;generation 2 has 21 finalizable objects&lt;br/&gt;Ready&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__68&quot;&gt;for&lt;/span&gt;&amp;nbsp;finalization 971560 objects &amp;nbsp;&amp;lt;- 严重积压！&lt;br/&gt;Statistics&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__69&quot;&gt;for&lt;/span&gt;&amp;nbsp;all finalizable objects:&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MT &amp;nbsp; &amp;nbsp;Count &amp;nbsp; &amp;nbsp;TotalSize Class Name&lt;br/&gt;00007ffdbaa4fb58 &amp;nbsp; 999987 &amp;nbsp; &amp;nbsp; 31999584 ConsoleApp2.Person &amp;nbsp;&amp;lt;- 罪魁祸首&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__70&quot;&gt;2.3 调查终结器线程活动&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__71&quot;&gt;检查终结器线程正在做什么：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__72&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__73&quot;&gt;0:001&amp;gt; !t&lt;br/&gt;&amp;nbsp; &amp;nbsp;5 &amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp; 3f4c 000000001AA94090 &amp;nbsp;202b220 Preemptive &amp;nbsp;... &amp;nbsp;MTA (Finalizer)&lt;br/&gt;&lt;br/&gt;0:001&amp;gt; ~~[3f4c]s&lt;br/&gt;ntdll!NtDelayExecution+0x14:&lt;br/&gt;00007ffe`8908c634 c3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ret&lt;br/&gt;&lt;br/&gt;0:005&amp;gt; !clrstack&lt;br/&gt;OS Thread Id: 0x3f4c (5)&lt;br/&gt;000000001ACEF868 00007ffe8908c634 [HelperMethodFrame] System.Threading.Thread.SleepInternal(Int32)&lt;br/&gt;000000001ACEF960 00007ffe19f0c46b System.Threading.Thread.Sleep(Int32)&lt;br/&gt;000000001ACEF990 00007ffdba986e15 ConsoleApp2.Person.Finalize() &amp;nbsp;&amp;lt;- 阻塞在 Sleep&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__74&quot;&gt;2.4 使用 PerfView 测量终结时间&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__75&quot;&gt;使用 ETW 事件测量终结持续时间：&lt;/p&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot;js_darkmode__76 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__77&quot;&gt;打开 PerfView 并开始收集&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__78&quot;&gt;在 Events 视图中搜索&amp;nbsp;&lt;code style=&quot;&quot;&gt;Finalize&lt;/code&gt;&amp;nbsp;事件&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__79&quot;&gt;分析&amp;nbsp;&lt;code style=&quot;&quot;&gt;FinalizersStart&lt;/code&gt;、&lt;code style=&quot;&quot;&gt;FinalizerObject&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;&quot;&gt;FinalizersStop&lt;/code&gt;&amp;nbsp;事件&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__80&quot;&gt;计算连续&amp;nbsp;&lt;code style=&quot;&quot;&gt;FinalizerObject&lt;/code&gt;&amp;nbsp;事件之间的时间差&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__81&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__82&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__83&quot;&gt;第三章：线程同步内部机制&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__84&quot;&gt;3.1 理解 Monitor.Wait/Pulse 机制&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__85&quot;&gt;&lt;code style=&quot;&quot;&gt;Monitor.Wait&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;&quot;&gt;Monitor.Pulse&lt;/code&gt;&amp;nbsp;机制对于线程协调至关重要，但常常被误解。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__86&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__87&quot;&gt;场景&lt;/strong&gt;：Worker1 等待 Worker2 完成：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__88&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__89&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__90&quot;&gt;static&lt;/span&gt;&amp;nbsp;Person lockObject =&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__91&quot;&gt;new&lt;/span&gt;&amp;nbsp;Person();&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__92&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__93&quot;&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;Worker1&lt;/span&gt;()&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__94&quot;&gt;lock&lt;/span&gt;&amp;nbsp;(lockObject) {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;1. Execute worker1...&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monitor.Wait(lockObject); &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 释放锁并等待&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;4. Continue worker1...&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__95&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__96&quot;&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;Worker2&lt;/span&gt;()&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__97&quot;&gt;lock&lt;/span&gt;&amp;nbsp;(lockObject) {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;3. worker2 completed...&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monitor.Pulse(lockObject); &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 唤醒一个等待线程&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__98&quot;&gt;3.2 WaitEventLink 数据结构&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__99&quot;&gt;CoreCLR 内部使用&amp;nbsp;&lt;code style=&quot;&quot;&gt;WaitEventLink&lt;/code&gt;&amp;nbsp;来追踪等待线程：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__100&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__101&quot;&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__102&quot;&gt;struct&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c18401;line-height: 26px;&quot;&gt;WaitEventLink&lt;/span&gt;&amp;nbsp;{&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; SyncBlock* &amp;nbsp; &amp;nbsp; &amp;nbsp;m_WaitSB; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 当前对象的 syncblock&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; CLREvent* &amp;nbsp; &amp;nbsp; &amp;nbsp; m_EventWait; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 当前线程的等待事件&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; PTR_Thread &amp;nbsp; &amp;nbsp; &amp;nbsp;m_Thread; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 所属线程&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; PTR_WaitEventLink m_Next; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 链接到下一个 SyncBlock&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; SLink &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m_LinkSB; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 链接到下一个等待线程&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; DWORD &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m_RefCount; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 同一 SyncBlock 上的等待计数&lt;/span&gt;&lt;br/&gt;};&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__103&quot;&gt;3.3 Monitor.Wait 执行流程&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__104&quot;&gt;&lt;code style=&quot;&quot;&gt;Monitor.Wait&lt;/code&gt;&amp;nbsp;方法执行以下步骤：&lt;/p&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot;js_darkmode__105 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__106&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__107&quot;&gt;创建 WaitEventLink&lt;/strong&gt;：用当前 SyncBlock 和线程信息初始化&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__108&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__109&quot;&gt;入队到线程队列&lt;/strong&gt;：添加到&amp;nbsp;&lt;code style=&quot;&quot;&gt;m_LinkSB&lt;/code&gt;&amp;nbsp;队列以便 Pulse 通知&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__110&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__111&quot;&gt;释放 Monitor&lt;/strong&gt;：调用&amp;nbsp;&lt;code style=&quot;&quot;&gt;LeaveMonitorCompletely()&lt;/code&gt;&amp;nbsp;释放锁&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__112&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__113&quot;&gt;阻塞线程&lt;/strong&gt;：等待&amp;nbsp;&lt;code style=&quot;&quot;&gt;m_EventWait&lt;/code&gt;&amp;nbsp;直到 Pulse 被调用&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__114&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__115&quot;&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;BOOL&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;SyncBlock::Wait&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;(INT32 timeOut)&lt;/span&gt;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; WaitEventLink* walk = pCurThread-&amp;gt;WaitEventLinkForSyncBlock(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__116&quot;&gt;this&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; CLREvent* hEvent = &amp;amp;(pCurThread-&amp;gt;m_EventWait);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp; waitEventLink.m_WaitSB =&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__117&quot;&gt;this&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; waitEventLink.m_EventWait = hEvent;&lt;br/&gt;&amp;nbsp; &amp;nbsp; waitEventLink.m_Thread = pCurThread;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp; ThreadQueue::EnqueueThread(pWaitEventLink,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__118&quot;&gt;this&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp; syncState.m_EnterCount = LeaveMonitorCompletely();&lt;br/&gt;&amp;nbsp; &amp;nbsp; isTimedOut = pCurThread-&amp;gt;Block(timeOut, &amp;amp;syncState);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__119&quot;&gt;return&lt;/span&gt;&amp;nbsp;!isTimedOut;&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__120&quot;&gt;3.4 Monitor.Pulse vs PulseAll&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__121&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__122&quot;&gt;Pulse&lt;/strong&gt;：只唤醒队列中的第一个线程：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__123&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__124&quot;&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__125&quot;&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;SyncBlock::Pulse&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; WaitEventLink* pWaitEventLink;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__126&quot;&gt;if&lt;/span&gt;&amp;nbsp;((pWaitEventLink = ThreadQueue::DequeueThread(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__127&quot;&gt;this&lt;/span&gt;)) !=&amp;nbsp;&lt;span style=&quot;color: #0184bb;line-height: 26px;&quot;&gt;NULL&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pWaitEventLink-&amp;gt;m_EventWait-&amp;gt;Set();&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__128&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__129&quot;&gt;PulseAll&lt;/strong&gt;：唤醒所有等待线程：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__130&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__131&quot;&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__132&quot;&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;SyncBlock::PulseAll&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; WaitEventLink* pWaitEventLink;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__133&quot;&gt;while&lt;/span&gt;&amp;nbsp;((pWaitEventLink = ThreadQueue::DequeueThread(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__134&quot;&gt;this&lt;/span&gt;)) !=&amp;nbsp;&lt;span style=&quot;color: #0184bb;line-height: 26px;&quot;&gt;NULL&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pWaitEventLink-&amp;gt;m_EventWait-&amp;gt;Set();&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__135&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__136&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__137&quot;&gt;第四章：使用 Harmony 进行运行时补丁&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__138&quot;&gt;4.1 Harmony 是什么？&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__139&quot;&gt;Harmony 是一个强大的库，用于运行时修补、替换和装饰 .NET 方法。它跨所有主要平台工作，并提供类似 AOP 的功能，无需修改源代码。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__140&quot;&gt;4.2 关键注入点&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__141&quot;&gt;&lt;section&gt;补丁类型&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__142&quot;&gt;&lt;section&gt;描述&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__143&quot;&gt;&lt;section&gt;使用场景&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__144&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__145&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__146&quot;&gt;Prefix&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__147&quot;&gt;&lt;section&gt;在原始方法之前运行&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__148&quot;&gt;&lt;section&gt;验证、日志&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__149&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__150&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__151&quot;&gt;Postfix&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__152&quot;&gt;&lt;section&gt;在原始方法之后运行&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__153&quot;&gt;&lt;section&gt;结果转换&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__154&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__155&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__156&quot;&gt;Transpiler&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__157&quot;&gt;&lt;section&gt;直接修改 IL 代码&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__158&quot;&gt;&lt;section&gt;高级代码操作&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__159&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__160&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__161&quot;&gt;Finalizer&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__162&quot;&gt;&lt;section&gt;用 try/finally 包装整个方法&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__163&quot;&gt;&lt;section&gt;异常隔离&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__164&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__165&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__166&quot;&gt;Reverse Patch&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__167&quot;&gt;&lt;section&gt;创建指向原始方法的代理&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__168&quot;&gt;&lt;section&gt;跨模块调用&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__169&quot;&gt;4.3 实际用例：追踪线程创建&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__170&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__171&quot;&gt;问题&lt;/strong&gt;：线程数突然飙升到 1000+，但不知道原因。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__172&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__173&quot;&gt;解决方案&lt;/strong&gt;：Hook&amp;nbsp;&lt;code style=&quot;&quot;&gt;Thread.Start()&lt;/code&gt;&amp;nbsp;来捕获调用栈：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__174&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__175&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__176&quot;&gt;var&lt;/span&gt;&amp;nbsp;harmony =&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__177&quot;&gt;new&lt;/span&gt;&amp;nbsp;Harmony(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;com.example.threadhook&amp;quot;&lt;/span&gt;);&lt;br/&gt;harmony.PatchAll();&lt;br/&gt;&lt;br/&gt;[&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;HarmonyPatch(typeof(Thread),&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;Start&amp;quot;&lt;/span&gt;, new Type[&lt;/span&gt;] { })]&lt;br/&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__178&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__179&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;ThreadStartHook&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__180&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__181&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__182&quot;&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;Prefix&lt;/span&gt;(&lt;span style=&quot;line-height: 26px;&quot;&gt;Thread __instance&lt;/span&gt;)&lt;/span&gt;&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;$&amp;quot;Thread&amp;nbsp;&lt;span style=&quot;color: #e45649;line-height: 26px;&quot;&gt;{__instance.ManagedThreadId}&lt;/span&gt;&amp;nbsp;starting:&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(Environment.StackTrace);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__183&quot;&gt;4.4 底层原理：JMP 指令 Hook&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__184&quot;&gt;Harmony 通过重写 JIT 编译方法的开头，使其跳转到动态生成的代理：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__185&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__186&quot;&gt;0:013&amp;gt; !U 00007ff85bd0e440&lt;br/&gt;preJIT generated code&lt;br/&gt;System.Threading.Thread.Start()&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 00007ff8`5bd0e440 e9cb22fba2 &amp;nbsp; &amp;nbsp; &amp;nbsp;jmp &amp;nbsp; &amp;nbsp; 00007ff7`fecc0710 &amp;nbsp;&amp;lt;- 跳转到代理&lt;br/&gt;&lt;br/&gt;0:013&amp;gt; !U 00007ff7`fecc0710&lt;br/&gt;Normal JIT generated code&lt;br/&gt;DynamicClass.System.Threading.Thread.Start_Patch1(System.Threading.Thread)&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__187&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__188&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__189&quot;&gt;第五章：跨平台调试技术&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__190&quot;&gt;5.1 Linux 函数 Hook&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__191&quot;&gt;在 Linux 上，主要有两种技术可用：&lt;/p&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__192&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__193&quot;&gt;LD_PRELOAD 拦截&lt;/strong&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__194&quot;&gt;LD_PRELOAD 利用动态链接器的加载顺序来覆盖符号：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__195&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__196&quot;&gt;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;#&lt;span style=&quot;line-height: 26px;&quot;&gt;define&lt;/span&gt;&amp;nbsp;_GNU_SOURCE&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;#&lt;span style=&quot;line-height: 26px;&quot;&gt;include&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;lt;dlfcn.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;#&lt;span style=&quot;line-height: 26px;&quot;&gt;include&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;#&lt;span style=&quot;line-height: 26px;&quot;&gt;include&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;lt;fcntl.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__197&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 26px;&quot;&gt;(*real_openat)&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__198&quot;&gt;int&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__199&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__200&quot;&gt;char&lt;/span&gt;*,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__201&quot;&gt;int&lt;/span&gt;, ...)&lt;/span&gt;&amp;nbsp;&lt;/span&gt;=&amp;nbsp;&lt;span style=&quot;color: #0184bb;line-height: 26px;&quot;&gt;NULL&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__202&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;openat&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__203&quot;&gt;int&lt;/span&gt;&amp;nbsp;dirfd,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__204&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__205&quot;&gt;char&lt;/span&gt;&amp;nbsp;*pathname,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__206&quot;&gt;int&lt;/span&gt;&amp;nbsp;flags, ...)&lt;/span&gt;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c18401;line-height: 26px;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;hooked openat: path=%s\n&amp;quot;&lt;/span&gt;, pathname);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__207&quot;&gt;if&lt;/span&gt;&amp;nbsp;(!real_openat) {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; real_openat = dlsym(RTLD_NEXT,&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;openat&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__208&quot;&gt;return&lt;/span&gt;&amp;nbsp;real_openat(dirfd, pathname, flags);&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__209&quot;&gt;编译和使用：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__210&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__211&quot;&gt;gcc -shared -fPIC -o libhookopenat.so hook_openat.c -ldl&lt;br/&gt;LD_PRELOAD=./libhookopenat.so ./myapp&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__212&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__213&quot;&gt;Funchook 库&lt;/strong&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__214&quot;&gt;Funchook 提供更细粒度的函数级 Hook：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__215&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__216&quot;&gt;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;#&lt;span style=&quot;line-height: 26px;&quot;&gt;include&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;lt;funchook.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__217&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 26px;&quot;&gt;(*orig_openat)&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__218&quot;&gt;int&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__219&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__220&quot;&gt;char&lt;/span&gt;*,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__221&quot;&gt;int&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__222&quot;&gt;mode_t&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__223&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;hooked_openat&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;(&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__224&quot;&gt;int&lt;/span&gt;&amp;nbsp;dirfd,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__225&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__226&quot;&gt;char&lt;/span&gt;&amp;nbsp;*pathname,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__227&quot;&gt;int&lt;/span&gt;&amp;nbsp;flags,&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__228&quot;&gt;mode_t&lt;/span&gt;&amp;nbsp;mode)&lt;/span&gt;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c18401;line-height: 26px;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;Hooked openat: path=%s\n&amp;quot;&lt;/span&gt;, pathname);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__229&quot;&gt;return&lt;/span&gt;&amp;nbsp;orig_openat(dirfd, pathname, flags, mode);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__230&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4078f2;line-height: 26px;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; orig_openat = dlsym(RTLD_NEXT,&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;openat&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__231&quot;&gt;funchook_t&lt;/span&gt;&amp;nbsp;*funchook = funchook_create();&lt;br/&gt;&amp;nbsp; &amp;nbsp; funchook_prepare(funchook, (&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__232&quot;&gt;void&lt;/span&gt;**)&amp;amp;orig_openat, hooked_openat);&lt;br/&gt;&amp;nbsp; &amp;nbsp; funchook_install(funchook,&amp;nbsp;&lt;span style=&quot;color: #986801;line-height: 26px;&quot;&gt;0&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;// 测试 Hook&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; openat(AT_FDCWD,&amp;nbsp;&lt;span style=&quot;color: #50a14f;line-height: 26px;&quot;&gt;&amp;quot;/etc/passwd&amp;quot;&lt;/span&gt;, O_RDONLY);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp; &amp;nbsp; funchook_uninstall(funchook,&amp;nbsp;&lt;span style=&quot;color: #986801;line-height: 26px;&quot;&gt;0&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; funchook_destroy(funchook);&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__233&quot;&gt;5.2 使用 Wireshark 进行网络调试&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__234&quot;&gt;对于网络相关问题，Wireshark 在捕获和分析 .NET 应用程序流量方面非常宝贵。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__235&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__236&quot;&gt;捕获 HTTP 文件上传&lt;/strong&gt;：&lt;/p&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot;js_darkmode__237 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__238&quot;&gt;在服务器上设置捕获过滤器：&lt;code style=&quot;&quot;&gt;tcp port 80&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__239&quot;&gt;从客户端上传文件&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__240&quot;&gt;右键点击 HTTP 请求 →&amp;nbsp;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__241&quot;&gt;Follow&lt;/strong&gt;&amp;nbsp;→&amp;nbsp;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__242&quot;&gt;TCP Stream&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__243&quot;&gt;保存原始数据并使用 WinHex 提取二进制 payload&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__244&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__245&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__246&quot;&gt;第六章：栈溢出深度剖析&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__247&quot;&gt;6.1 理解栈溢出异常&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__248&quot;&gt;栈溢出（异常代码&amp;nbsp;&lt;code style=&quot;&quot;&gt;c00000fd&lt;/code&gt;）发生在线程的栈空间耗尽时，通常是由于无限递归造成的。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__249&quot;&gt;6.2 在 WinDbg 中分析栈溢出&lt;/span&gt;&lt;/h3&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__250&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__251&quot;&gt;This dump file has an exception of interest stored&amp;nbsp;&lt;span style=&quot;color: #a626a4;line-height: 26px;&quot; class=&quot;js_darkmode__252&quot;&gt;in&lt;/span&gt;&amp;nbsp;it.&lt;br/&gt;(9e4.bc4): Stack overflow - code c00000fd (first/second chance not available)&lt;br/&gt;&lt;br/&gt;0:028&amp;gt; .excr;k&lt;br/&gt;&lt;span style=&quot;color: #a0a1a7;font-style: italic;line-height: 26px;&quot;&gt;# Child-SP &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RetAddr &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Call Site&lt;/span&gt;&lt;br/&gt;00 00000000`123d5fb0 000007fe`f9236451 &amp;nbsp; &amp;nbsp; clr!SlowAllocateString+0x11&lt;br/&gt;...&lt;br/&gt;05 00000000`123d6630 000007fe`9ab33e04 &amp;nbsp; &amp;nbsp; pdfrender4net!symbol00(Byte[],...)&lt;br/&gt;06 00000000`123d6720 000007fe`9ab3be52 &amp;nbsp; &amp;nbsp; pdfrender4net!symbol00(Int32,Int32)&lt;br/&gt;07 00000000`123d6790 000007fe`9ab3bd2a &amp;nbsp; &amp;nbsp; pdfrender4net!symbol00(Byte[],Boolean)&lt;br/&gt;08 00000000`123d67f0 000007fe`9ab33e35 &amp;nbsp; &amp;nbsp; pdfrender4net!symbol00(Byte[],...)&lt;br/&gt;...&lt;br/&gt;ff 00000000`123df860 000007fe`9ab3bd2a &amp;nbsp; &amp;nbsp; pdfrender4net!symbol00 &amp;nbsp;&amp;lt;- 无限递归！&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__253&quot;&gt;6.3 栈布局与 PAGE_GUARD 机制&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__254&quot;&gt;Windows 使用守卫页机制进行栈增长：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__255&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__256&quot;&gt;+------------------+ &amp;nbsp;&amp;lt;- StackBase (高地址)&lt;br/&gt;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br/&gt;| &amp;nbsp; Used Stack &amp;nbsp; &amp;nbsp; |&lt;br/&gt;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br/&gt;+------------------+ &amp;nbsp;&amp;lt;- RSP (当前栈指针)&lt;br/&gt;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br/&gt;| &amp;nbsp;PAGE_GUARD &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;&amp;lt;- 守卫页触发提交&lt;br/&gt;| &amp;nbsp; (哨兵) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;br/&gt;+------------------+ &amp;nbsp;&amp;lt;- StackLimit&lt;br/&gt;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br/&gt;| &amp;nbsp;Reserved &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;&amp;lt;- 尚未提交&lt;br/&gt;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;br/&gt;+------------------+&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__257&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__258&quot;&gt;关键洞察&lt;/strong&gt;：栈溢出 (&lt;code style=&quot;&quot;&gt;c00000fd&lt;/code&gt;) 发生在 RSP 进入守卫页时，而不是到达实际限制时。使用以下命令验证：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__259&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #383a42;padding-top: 15px;background: #fafafa;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__260&quot;&gt;0:028&amp;gt; r rsp&lt;br/&gt;rsp=00000000123d5fb0&lt;br/&gt;&lt;br/&gt;0:028&amp;gt; !teb&lt;br/&gt;&amp;nbsp; &amp;nbsp; StackBase: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0000000012450000&lt;br/&gt;&amp;nbsp; &amp;nbsp; StackLimit: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000000123d1000&lt;br/&gt;&lt;br/&gt;0:028&amp;gt; !address -f:Stack&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0`123d1000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0`12450000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PAGE_READWRITE | PAGE_GUARD &amp;nbsp; Stack&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__261&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__262&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__263&quot;&gt;第七章：高级调试最佳实践&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__264&quot;&gt;7.1 工具链推荐&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__265&quot;&gt;&lt;section&gt;类别&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__266&quot;&gt;&lt;section&gt;工具&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__267&quot;&gt;&lt;section&gt;使用场景&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__268&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__269&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__270&quot;&gt;Dump 分析&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__271&quot;&gt;&lt;section&gt;WinDbg, SOS, PSSCOR&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__272&quot;&gt;&lt;section&gt;内存泄露、崩溃&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__273&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__274&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__275&quot;&gt;性能分析&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__276&quot;&gt;&lt;section&gt;PerfView, dotTrace&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__277&quot;&gt;&lt;section&gt;CPU 分析、GC 分析&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__278&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__279&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__280&quot;&gt;网络调试&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__281&quot;&gt;&lt;section&gt;Wireshark, tcpdump&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__282&quot;&gt;&lt;section&gt;协议分析&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__283&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__284&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__285&quot;&gt;运行时补丁&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__286&quot;&gt;&lt;section&gt;Harmony, MinHook&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__287&quot;&gt;&lt;section&gt;诊断、热修复&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__288&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__289&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__290&quot;&gt;跨平台调试&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__291&quot;&gt;&lt;section&gt;lldb, funchook&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__292&quot;&gt;&lt;section&gt;Linux 调试&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__293&quot;&gt;7.2 调试清单&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot;js_darkmode__294 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__295&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__296&quot;&gt;复现&lt;/strong&gt;：始终尝试在受控环境中复现问题&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__297&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__298&quot;&gt;捕获&lt;/strong&gt;：在调查前收集 dumps、traces 和日志&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__299&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__300&quot;&gt;假设&lt;/strong&gt;：根据症状制定理论&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__301&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__302&quot;&gt;验证&lt;/strong&gt;：使用工具确认或反驳假设&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__303&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__304&quot;&gt;修复&lt;/strong&gt;：应用最小化的修复来解决问题&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__305&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__306&quot;&gt;验证&lt;/strong&gt;：确认修复有效且不会引入回归&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__307&quot;&gt;7.3 生产环境注意事项&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__308 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__309&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__310&quot;&gt;最小影响&lt;/strong&gt;：尽可能使用非侵入性工具（PerfView）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__311&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__312&quot;&gt;数据隐私&lt;/strong&gt;：在生产环境收集 dumps 时要谨慎&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__313&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__314&quot;&gt;自动化&lt;/strong&gt;：设置自动化监控和告警&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__315&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__316&quot;&gt;文档&lt;/strong&gt;：记录根本原因和解决方案以备将来参考&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__317&quot;/&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__318&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__319&quot;&gt;结论&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__320&quot;&gt;高级 .NET 调试需要深入了解托管和非托管运行时内部机制，结合使用专业工具的实践经验。通过掌握句柄追踪、终结器队列分析、线程同步内部机制、运行时补丁和跨平台调试等技术，开发人员可以自信地应对最具挑战性的生产问题。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__321&quot;&gt;记住：每个 bug 都会留下痕迹。关键是知道在哪里寻找以及使用哪些工具。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 20 Aug 2026 09:48:32 +0800</pubDate></item><item><title>如何理解 C# / .NET 的 async 和 await</title><link>https://www.codepub.top/post/656.html</link><description>&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__0&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;学&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;async/await&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;时，常见困惑往往集中在几处：&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;async&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;是否意味着另开线程执行？加了&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;await&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;之后，代码还算不算同步？&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;HttpClient.GetAsync&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;已经返回了，下一行会不会立刻执行？这些问题看似分散，其实指向同一套机制。本文按因果顺序展开：先说明为什么需要异步，再引入 Task，然后分别讲清&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;async&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;与&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;await&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;各自做什么，最后用一次 HTTP 请求把整条调用链走通，并补充线程、上下文与常见误用。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box; height: 0px; overflow: visible; border-width: medium medium 1px; border-style: none none solid; border-color: currentcolor currentcolor rgb(221, 221, 221); border-image: none 100% / 1 / 0 stretch; margin: 24px 0px; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box; line-height: 30px; margin: 24px 0px 8px; color: rgb(79, 79, 79); font-weight: 600; font-size: 20px; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;线程在 I/O 上的空等&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Web 后端大量时间花在 I/O 上：查数据库、调 HTTP、读写文件。以数据库查询为例，CPU 发出请求之后，往往要等待较长时间才能拿到结果。若采用同步写法：&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; margin: 1.2em 0px 24px; color: rgb(0, 0, 0); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;code style=&quot;white-space: pre-wrap; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgba(0, 0, 0, 0.05); border-radius: 2px; padding: 0.5em; color: unset; line-height: 22px; display: block; text-size-adjust: none; overflow-x: auto; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #0077AA; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;data&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #A67F59; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;database&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #DD4A68; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Query&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #A67F59; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;..&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #DD4A68; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Process&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;处理这条请求的线程会在&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Query&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;处一直阻塞，直到数据返回。在此期间线程无法处理其他工作。并发请求增多时，大量线程处于等待状态，上下文切换和内存开销随之上升，吞吐反而下降。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;期望的行为是：发起 I/O 之后，线程先去处理别的任务；待 I/O 完成，再按原有顺序执行后续逻辑。难点在于，后续代码不能丢失，执行顺序也不能乱。 .NET 通过&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; font-weight: 700; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;与&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; font-weight: 700; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;async/await&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;共同实现这一点。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;需要首先排除两个误解。其一，&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;async&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;并不等于自动创建新线程；其二，&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;await&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;在 Task 尚未完成时挂起的是当前 async 方法，而不是让线程阻塞在原地空等。async/await 的核心价值在于：I/O 等待阶段尽量不占用线程，从而在高并发场景下用更少的线程支撑更多请求。它解决的是吞吐与资源利用问题，而不是让单次 CPU 计算变快。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box; height: 0px; overflow: visible; border-width: medium medium 1px; border-style: none none solid; border-color: currentcolor currentcolor rgb(221, 221, 221); border-image: none 100% / 1 / 0 stretch; margin: 24px 0px; visibility: visible;&quot; class=&quot;js_darkmode__19&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box; line-height: 30px; margin: 24px 0px 8px; color: rgb(79, 79, 79); font-weight: 600; font-size: 20px; visibility: visible;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task：异步操作在 .NET 中的表示&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;理解 async/await 之前，必须先理解 Task。现代 .NET 中，一次尚未完成或已经完成的工作，通常用&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;或&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task&amp;lt;T&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;描述：&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; margin: 1.2em 0px 24px; color: rgb(0, 0, 0); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;code style=&quot;white-space: pre-wrap; box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgba(0, 0, 0, 0.05); border-radius: 2px; padding: 0.5em; color: unset; line-height: 22px; display: block; text-size-adjust: none; overflow-x: auto; visibility: visible;&quot; class=&quot;js_darkmode__25&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;HttpResponseMessage&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;task&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #A67F59; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;httpClient&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #DD4A68; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;GetAsync&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #999999; font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;执行完这行代码时，HTTP 响应往往尚未到达，但调用方已经持有一个&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task&amp;lt;HttpResponseMessage&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;对象。Task 封装了三类信息：操作的当前状态（进行中、已完成、已失败）、完成后的结果或异常，以及需要在操作完成时得到通知的延续逻辑（continuation）。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 0px 0px 16px; color: rgb(77, 77, 77); font-size: 16px; font-weight: 400; line-height: 26px; overflow: auto hidden; visibility: visible;&quot; class=&quot;js_darkmode__28&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task 与 Thread 不是同一层次的概念。Thread 是执行代码的系统资源；Task 是对一次异步工作的抽象。一个 Task 可能关联线程池中的某条线程（例如通过&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; font-size: 14px; background-color: rgb(249, 242, 244); border-radius: 2px; padding: 2px 4px; color: rgb(199, 37, 78); line-height: 22px; visibility: visible;&quot; class=&quot;js_darkmode__29&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Task.Run&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;提交的工作），也可能在纯 I/O 等待阶段根本不占用应用线程，仅在 I/O 完成后才由运行时调度线程执行后续 C# 代码。因此，Task 表示的是操作本身，而不是执行该操作的线程。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box; height: 0px; overflow: visible; border-width: medium medium 1px; border-style: none none solid; border-color: currentcolor currentcolor rgb(221, 221, 221); border-image: none 100% / 1 / 0 stretch; margin: 24px 0px; visibility: visible;&quot; class=&quot;js_darkmode__30&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__31&quot;&gt;&lt;span class=&quot;&quot;&gt;Task.Run&lt;/span&gt; 与 GetAsync：两种截然不同的用法&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__33&quot;&gt;Task.Run&lt;/code&gt;&amp;nbsp;与&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__34&quot;&gt;HttpClient.GetAsync&lt;/code&gt;&amp;nbsp;都返回 Task，但语义完全不同，混用这两个概念是理解 async/await 时最常见的错误之一。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__35&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__36&quot;&gt;Task.Run&lt;/code&gt;&amp;nbsp;将委托提交到线程池执行：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__38&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__39&quot;&gt;await&lt;/span&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Run&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Compute&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__40&quot;&gt;其用途是把 CPU 密集型计算，或无法直接改为异步 API 的阻塞调用，转移到线程池线程上运行。等待期间，线程池线程确实在执行传入的委托。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__41&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__42&quot;&gt;HttpClient.GetAsync&lt;/code&gt;&amp;nbsp;则是典型的异步 I/O API：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__45&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__46&quot;&gt;调用后，请求交给操作系统与网络栈处理，方法立即返回一个通常尚未完成的 Task。等待由底层 I/O 子系统完成；在 Windows 上，这类实现常依赖 I/O 完成端口（&lt;span class=&quot;&quot;&gt;IOCP&lt;/span&gt;）等机制，在 I/O 完成时通知运行时，再调度续体执行。整个 HTTP 往返过程中，应用线程不必专门陪等。&lt;/p&gt;&lt;table width=&quot;656&quot;&gt;&lt;thead&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__47 firstRow&quot;&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__48&quot;&gt;&lt;section&gt;&lt;br/&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__49&quot;&gt;&lt;section&gt;Task.Run&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__50&quot;&gt;&lt;section&gt;HttpClient.GetAsync&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__51&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__52&quot;&gt;&lt;section&gt;适用场景&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__53&quot;&gt;&lt;section&gt;CPU 密集、阻塞同步 API 的包装&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__54&quot;&gt;&lt;section&gt;网络、文件、数据库等 I/O&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__55&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__56&quot;&gt;&lt;section&gt;等待期间&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__57&quot;&gt;&lt;section&gt;线程池线程在执行委托&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__58&quot;&gt;&lt;section&gt;通常无应用线程陪等 I/O&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__59&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__60&quot;&gt;&lt;section&gt;本质&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__61&quot;&gt;&lt;section&gt;换线程执行工作&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__62&quot;&gt;&lt;section&gt;I/O 完成通知&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__63&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__64&quot;&gt;有没有 await：行为的分水岭&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__65&quot;&gt;理解 async/await，最关键的分界在于：当前代码行是否对 Task 使用了&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__66&quot;&gt;await&lt;/code&gt;。&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box;line-height: 28px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 18px;&quot; class=&quot;js_darkmode__67&quot;&gt;仅调用 GetAsync，不使用 await&lt;/h3&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__68&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__69&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;lt;&lt;/span&gt;HttpResponseMessage&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;task&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;下一行&amp;quot;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;IsCompleted&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__70&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__71&quot;&gt;GetAsync&lt;/code&gt;&amp;nbsp;发起 I/O 并立即返回 Task，此时 Task 通常尚未完成。紧接着的&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__72&quot;&gt;Console.WriteLine&lt;/code&gt;&amp;nbsp;会马上执行，不会等待 HTTP 响应。网络传输在后台进行，待响应到达后，Task 才被标记为完成。没有&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__73&quot;&gt;await&lt;/code&gt;，就没有在语言层面等待 Task 完成的语义；Task 会在后台自行完成。&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box;line-height: 28px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 18px;&quot; class=&quot;js_darkmode__74&quot;&gt;对 GetAsync 使用 await&lt;/h3&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__75&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__76&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__77&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;response&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__78&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;下一行&amp;quot;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__79&quot;&gt;此时，只有&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__80&quot;&gt;await&lt;/code&gt;&amp;nbsp;之后的代码会等待 HTTP 完成后再执行。等待的对象是 Task，而不是占着线程做忙等。当 Task 尚未完成时，包含这段代码的 async 方法会挂起：方法暂时返回一个未完成的 Task 给调用方，当前线程可以释放去处理其他工作；Task 完成后，运行时通过续体从&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__81&quot;&gt;await&lt;/code&gt;&amp;nbsp;的下一行继续执行。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__82&quot;&gt;归纳起来有三条规则：&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__83&quot;&gt;GetAsync()&lt;/code&gt;&amp;nbsp;会立刻返回 Task；赋值之后、尚未遇到&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__84&quot;&gt;await&lt;/code&gt;&amp;nbsp;的普通语句会立刻执行；&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__85&quot;&gt;await&lt;/code&gt;&amp;nbsp;之后的语句，则等到对应 Task 完成之后，通过挂起与续体机制继续执行。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__86&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__87&quot;&gt;await 做了什么&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__88&quot;&gt;写法&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__89&quot;&gt;await GetUserAsync()&lt;/code&gt;&amp;nbsp;容易被误解为等待某个方法执行完毕。更精确的描述是：调用&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__90&quot;&gt;GetUserAsync()&lt;/code&gt;&amp;nbsp;会返回一个&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__91&quot;&gt;Task&amp;lt;User&amp;gt;&lt;/code&gt;，而&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__92&quot;&gt;await&lt;/code&gt;&amp;nbsp;等待的是这个 Task 达到完成状态。async 方法可能在第一个&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__93&quot;&gt;await&lt;/code&gt;&amp;nbsp;处就已经挂起并向调用方返回，因此等待的对象始终是 Task，而不是抽象意义上的方法执行过程。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__94&quot;&gt;编译器对&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__95&quot;&gt;await&lt;/code&gt;&amp;nbsp;的处理可以简化为：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__96&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__97&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__98&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;awaiter&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAwaiter&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__99&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;awaiter&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;IsCompleted&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__100&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;result&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;awaiter&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetResult&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__101&quot;&gt;else&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// 登记续体，挂起当前 async 方法，对外返回未完成的 Task&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__102&quot;&gt;若 Task 在&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__103&quot;&gt;await&lt;/code&gt;&amp;nbsp;处已经完成，则直接取结果并继续执行，几乎不产生挂起开销。若尚未完成，则必须挂起：既不能占着线程陪等 I/O，又不能在操作实际完成之前假装后续逻辑已经执行。挂起意味着记录当前执行位置、释放线程，并在 Task 完成后从下一语句恢复。&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__104&quot;&gt;IsCompleted&lt;/code&gt;&amp;nbsp;的判断由&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__105&quot;&gt;await&lt;/code&gt;&amp;nbsp;在内部完成，日常开发中直接使用&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__106&quot;&gt;await&lt;/code&gt;&amp;nbsp;即可，无需手动检查。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__107&quot;&gt;需要特别说明的是：&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__108&quot;&gt;await&lt;/code&gt;&amp;nbsp;处挂起的是&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;当前 async 方法&lt;/strong&gt;，不是 Task 本身。Task 表示 HTTP 请求这一桩正在进行的工作；方法在 Task 完成之前不能执行&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__109&quot;&gt;await&lt;/code&gt;&amp;nbsp;之后的语句，从&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;代码顺序&lt;/strong&gt;上看，确实是在等待这一行所代表的操作完成。许多困惑正来源于此——既然方法在等，为何还称异步？&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__110&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__111&quot;&gt;异步指的是什么&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__112&quot;&gt;异步在这里的含义，不是不必等待结果，而是用不阻塞线程的方式等待结果。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__113&quot;&gt;同步与异步都要求在拿到 HTTP 响应之后，才能执行后续逻辑。差别在于等待期间线程是否被占用：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__114&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__115&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// 同步：线程在 Get 内部阻塞，直到响应返回&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__116&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;response&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Get&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;下一行&amp;quot;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// 异步：await 之后的下一行同样要等响应，但等待方式不同&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__117&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;response&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__118&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;下一行&amp;quot;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;table width=&quot;656&quot;&gt;&lt;thead&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__119 firstRow&quot;&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__120&quot;&gt;&lt;section&gt;&lt;br/&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__121&quot;&gt;&lt;section&gt;同步&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__122&quot;&gt;&lt;section&gt;async/await&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__123&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__124&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;white-space: normal;word-break: normal !important;&quot; class=&quot;js_darkmode__125&quot;&gt;await&lt;/code&gt;&lt;section&gt;&amp;nbsp;/ 阻塞调用之后的代码能否执行&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__126&quot;&gt;&lt;section&gt;不能，必须等 I/O 完成&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__127&quot;&gt;&lt;section&gt;不能，必须等 Task 完成&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__128&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__129&quot;&gt;&lt;section&gt;等待期间，执行这条逻辑的线程在做什么&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__130&quot;&gt;&lt;section&gt;阻塞在原地，无法处理其他工作&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__131&quot;&gt;&lt;section&gt;已释放，可去处理其他请求&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__132&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__133&quot;&gt;&lt;section&gt;收益体现在&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__134&quot;&gt;&lt;section&gt;—&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__135&quot;&gt;&lt;section&gt;系统层面：更少线程支撑更多并发&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__136&quot;&gt;因此，对&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;单个 async 方法的控制流&lt;/strong&gt;而言，它仍然在等 Task 完成；对&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;线程与服务器资源&lt;/strong&gt;而言，等待没有占住线程。调用方若写&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__137&quot;&gt;await FetchAsync()&lt;/code&gt;，逻辑上同样在等&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__138&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;的 Task 完成；但当上千个请求同时处于&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__139&quot;&gt;await&lt;/code&gt;&amp;nbsp;I/O 的状态时，少量线程即可轮转服务它们，而不需要上千条线程各自阻塞等待。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__140&quot;&gt;async/await 解决的是吞吐与资源利用，不是让某一行代码跳过等待、提前执行。所谓非阻塞等待，指的是：方法挂起并记住续体位置，线程不再陪等 I/O；Task 完成后，运行时调度续体，从&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__141&quot;&gt;await&lt;/code&gt;&amp;nbsp;下一行继续。逻辑顺序与同步写法一致，执行方式不同。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__142&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__143&quot;&gt;async 做了什么&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__144&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__145&quot;&gt;async&lt;/code&gt;&amp;nbsp;关键字本身不发起 I/O，也不释放线程。它的作用是告知编译器：当前方法中可能出现&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__146&quot;&gt;await&lt;/code&gt;，需要改写成实现&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__147&quot;&gt;IAsyncStateMachine&lt;/code&gt;&amp;nbsp;的状态机，并将返回类型约束为&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__148&quot;&gt;Task&lt;/code&gt;、&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__149&quot;&gt;Task&amp;lt;T&amp;gt;&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__150&quot;&gt;ValueTask&lt;/code&gt;&amp;nbsp;等。&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__151&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__152&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__153&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__154&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;FetchAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__155&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&amp;nbsp;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__156&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;response&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__157&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__158&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__159&quot;&gt;await&lt;/span&gt;&amp;nbsp;response&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;Content&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;ReadAsStringAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__160&quot;&gt;编译器为每个&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__161&quot;&gt;await&lt;/code&gt;&amp;nbsp;分配一个状态。方法在某处挂起时，状态被保存；Task 完成后，状态机通过&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__162&quot;&gt;MoveNext()&lt;/code&gt;&amp;nbsp;从下一状态继续。可以把这个过程理解为在书中插入书签：尚未读完的页码被记住，待条件允许时再从书签处往下读。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__163&quot;&gt;若 async 方法内没有任何&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__164&quot;&gt;await&lt;/code&gt;，则方法体从头到尾同步执行，最终返回一个已完成的 Task，编译器会给出 CS1998 警告——状态机的引入没有带来任何挂起点，属于多余开销。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__165&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__166&quot;&gt;async&lt;/code&gt;&amp;nbsp;与&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__167&quot;&gt;await&lt;/code&gt;&amp;nbsp;的分工因此十分明确：&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__168&quot;&gt;async&lt;/code&gt;&amp;nbsp;提供可挂起的方法外壳与状态机；&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__169&quot;&gt;await&lt;/code&gt;&amp;nbsp;是具体的挂起点，在 Task 尚未完成时挂起方法、释放线程，Task 完成后通过续体继续执行。代码因此可以按顺序书写，读起来接近同步逻辑；执行上则在每个&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__170&quot;&gt;await&lt;/code&gt;&amp;nbsp;处采用非阻塞的方式等待 Task，而非占线程空等。&lt;/p&gt;&lt;table width=&quot;656&quot;&gt;&lt;thead&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__171 firstRow&quot;&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__172&quot;&gt;&lt;section&gt;&lt;br/&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__173&quot;&gt;&lt;section&gt;async&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__174&quot;&gt;&lt;section&gt;await&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__175&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__176&quot;&gt;&lt;section&gt;职责&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__177&quot;&gt;&lt;section&gt;生成状态机；使方法可挂起；返回 Task&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__178&quot;&gt;&lt;section&gt;等待 Task；未完成时挂起当前方法&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__179&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__180&quot;&gt;&lt;section&gt;不负责&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__181&quot;&gt;&lt;section&gt;发起 I/O、自动并行、创建线程&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__182&quot;&gt;&lt;section&gt;占线程阻塞等待 I/O&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__183&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__184&quot;&gt;一条完整的调用链&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__185&quot;&gt;以下示例展示 Controller、业务方法与 HttpClient 如何串联：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__186&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__187&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__188&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;lt;&lt;/span&gt;IActionResult&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;&amp;nbsp;GetData&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__189&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;json&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__190&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;&amp;nbsp;FetchAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;https://api.example.com/data&amp;quot;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__191&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;&amp;nbsp;Ok&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;json&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__192&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__193&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;&amp;nbsp;FetchAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__194&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&amp;nbsp;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__195&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;response&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__196&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__197&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__198&quot;&gt;await&lt;/span&gt;&amp;nbsp;response&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;Content&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;ReadAsStringAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__199&quot;&gt;执行过程如下。&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__200&quot;&gt;GetData&lt;/code&gt;&amp;nbsp;执行到&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__201&quot;&gt;await FetchAsync&lt;/code&gt;&amp;nbsp;时进入&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__202&quot;&gt;FetchAsync&lt;/code&gt;；&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__203&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;执行到&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__204&quot;&gt;await GetAsync&lt;/code&gt;&amp;nbsp;时发起 HTTP 请求，Task 尚未完成，于是&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__205&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;挂起并向&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__206&quot;&gt;GetData&lt;/code&gt;&amp;nbsp;返回未完成的 Task；&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__207&quot;&gt;GetData&lt;/code&gt;&amp;nbsp;同样在&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__208&quot;&gt;await&lt;/code&gt;&amp;nbsp;处挂起。此时处理请求的线程可以回到线程池，去服务其他请求。HTTP 响应到达后，&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__209&quot;&gt;GetAsync&lt;/code&gt;&amp;nbsp;的 Task 完成，&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__210&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;的状态机恢复；若&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__211&quot;&gt;ReadAsStringAsync&lt;/code&gt;&amp;nbsp;再次引发等待，可能经历第二次挂起。最终&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__212&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;的 Task 完成，&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__213&quot;&gt;GetData&lt;/code&gt;&amp;nbsp;的续体执行并返回响应。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__214&quot;&gt;每一层&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__215&quot;&gt;await&lt;/code&gt;&amp;nbsp;遵循同一规则：等待对应的 Task，未完成则挂起。外层&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__216&quot;&gt;await FetchAsync&lt;/code&gt;&amp;nbsp;等待的是内层方法返回的整个 Task，也就是整条内部 await 链全部完成之后的结果。在这个链条中，&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__217&quot;&gt;GetAsync&lt;/code&gt;&amp;nbsp;产生代表 I/O 的 Task，&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__218&quot;&gt;async&lt;/code&gt;&amp;nbsp;使各层方法具备挂起能力，&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__219&quot;&gt;await&lt;/code&gt;&amp;nbsp;在 Task 未完成时暂停当前方法。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__220&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__221&quot;&gt;I/O、线程与续体&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__222&quot;&gt;I/O 由操作系统完成，但这并不意味着线程与整个过程无关。发起&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__223&quot;&gt;GetAsync&lt;/code&gt;&amp;nbsp;需要一条应用线程调用 API；等待网络或磁盘响应时，不必占用该线程空等；I/O 完成后执行&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__224&quot;&gt;await&lt;/code&gt;&amp;nbsp;之后的 C# 代码，同样需要线程，通常由运行时通过 &lt;span class=&quot;&quot;&gt;TaskScheduler&lt;/span&gt; 安排，在 ASP.NET Core 中多为线程池线程。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__225&quot;&gt;续体具体在哪条线程上执行，取决于&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__226&quot;&gt;SynchronizationContext&lt;/code&gt;&amp;nbsp;与&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__227&quot;&gt;TaskScheduler&lt;/code&gt;。ASP.NET Core 没有传统 ASP.NET 那种与请求绑定的同步上下文，续体多数在线程池线程上运行。WPF 与 WinForms 则默认将续体调度回 UI 线程，以便更新界面。因此，不宜笼统地说 await 一定在某个特定线程上恢复；准确的说法是：由当前环境的调度策略决定。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__228&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__229&quot;&gt;ConfigureAwait(false)&lt;/code&gt;&amp;nbsp;告诉&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__230&quot;&gt;await&lt;/code&gt;：续体不必捕获当前的&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__231&quot;&gt;SynchronizationContext&lt;/code&gt;。类库代码中常用此选项，以避免不必要的上下文切换，并降低特定场景下的死锁风险。UI 层需要在控件所在线程上更新界面时，则不应在需要触碰 UI 的&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__232&quot;&gt;await&lt;/code&gt;&amp;nbsp;之后使用&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__233&quot;&gt;ConfigureAwait(false)&lt;/code&gt;。ASP.NET Core 业务代码中往往可以不写该调用，但理解其含义有助于解释类库设计与死锁成因。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__234&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__235&quot;&gt;调用方：等待与否由调用方决定&lt;/h2&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__236&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__237&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__238&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;FetchAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__239&quot;&gt;调用方在&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__240&quot;&gt;await&lt;/code&gt;&amp;nbsp;处挂起，直到&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__241&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;返回的 Task 完成。&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__242&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__243&quot;&gt;_&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;FetchAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__244&quot;&gt;调用方不等待，立即继续执行后续代码；&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__245&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;仍在后台运行。是否等待与&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__246&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;内部是否包含&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__247&quot;&gt;await&lt;/code&gt;&amp;nbsp;无关——后者只说明&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__248&quot;&gt;FetchAsync&lt;/code&gt;&amp;nbsp;是一个具有挂起点的 async 方法，前者才决定调用方是否等待其 Task。认为方法内部有&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__249&quot;&gt;await&lt;/code&gt;&amp;nbsp;就等于同步方法，是对 async 语义的误读。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__250&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__251&quot;&gt;async 不等于并行&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__252&quot;&gt;连续书写两个&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__253&quot;&gt;await&lt;/code&gt;，意味着顺序等待：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__254&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__255&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__256&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url1&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__257&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url2&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__258&quot;&gt;总耗时近似两次请求之和。若要并发发起两个 HTTP 请求，需要先启动两个 Task，再一并等待：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__259&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__260&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__261&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;t1&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url1&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__262&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;t2&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url2&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__263&quot;&gt;await&lt;/span&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WhenAll&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;t1&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;,&lt;/span&gt;&amp;nbsp;t2&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__264&quot;&gt;并行来自两个 Task 同时处于进行之中，而不是&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__265&quot;&gt;async&lt;/code&gt;&amp;nbsp;关键字本身具有并行语义。&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__266&quot;&gt;Task.WhenAll&lt;/code&gt;&amp;nbsp;仅等待已启动的多个 Task，不会自动替开发者发起并发。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__267&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__268&quot;&gt;async 与多线程&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__269&quot;&gt;async/await 与多线程常被混为一谈，仿佛标了&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__270&quot;&gt;async&lt;/code&gt;&amp;nbsp;就是在开新线程。二者解决的是不同层面的问题，可以配合使用，但不应画等号。&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box;line-height: 28px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 18px;&quot; class=&quot;js_darkmode__271&quot;&gt;两个不同的目标&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__272&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;多线程&lt;/strong&gt;关心的是：能否让&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;多条线程同时执行代码&lt;/strong&gt;，通常为了利用多核 CPU，或把阻塞工作挪到后台线程，避免卡住 UI 或主流程。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__273&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;async/await&lt;/strong&gt;关心的是：在 I/O 等待期间，&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;不必占用线程空等&lt;/strong&gt;，用更少的线程支撑更多并发请求。它首要服务的是 I/O 密集型场景，而不是替代多核并行计算。&lt;/p&gt;&lt;table width=&quot;656&quot;&gt;&lt;thead&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__274 firstRow&quot;&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__275&quot;&gt;&lt;section&gt;维度&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__276&quot;&gt;&lt;section&gt;多线程&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__277&quot;&gt;&lt;section&gt;async/await&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__278&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__279&quot;&gt;&lt;section&gt;主要目标&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__280&quot;&gt;&lt;section&gt;并行执行、利用多核、后台跑 CPU/阻塞活&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__281&quot;&gt;&lt;section&gt;I/O 等待时不阻塞线程&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__282&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__283&quot;&gt;&lt;section&gt;典型手段&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__284&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;white-space: normal;word-break: normal !important;&quot; class=&quot;js_darkmode__285&quot;&gt;Thread&lt;/code&gt;&lt;section&gt;、&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;white-space: normal;word-break: normal !important;&quot; class=&quot;js_darkmode__286&quot;&gt;Task.Run&lt;/code&gt;、&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;white-space: normal;word-break: normal !important;&quot; class=&quot;js_darkmode__287&quot;&gt;Parallel.For&lt;/code&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__288&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;white-space: normal;word-break: normal !important;&quot; class=&quot;js_darkmode__289&quot;&gt;await GetAsync&lt;/code&gt;&lt;section&gt;、&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;white-space: normal;word-break: normal !important;&quot; class=&quot;js_darkmode__290&quot;&gt;await ToListAsync&lt;/code&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__291&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__292&quot;&gt;&lt;section&gt;是否必然创建新线程&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__293&quot;&gt;&lt;section&gt;是（或复用线程池线程执行工作）&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__294&quot;&gt;&lt;section&gt;否；I/O 等待阶段通常不为此专门开线程&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__295&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__296&quot;&gt;&lt;section&gt;典型场景&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__297&quot;&gt;&lt;section&gt;大量计算、图像处理、同步 API 包装&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__298&quot;&gt;&lt;section&gt;Web API、数据库、HTTP、文件 I/O&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__299&quot;&gt;因此，更准确的说法是：async/await 是 .NET 中实现&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;高并发 I/O&lt;/strong&gt;&amp;nbsp;的一套协作式模型；多线程是&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;并行执行&lt;/strong&gt;的一种资源与调度方式。async 不是多线程的同义词，也不是多线程的唯一实现方式。&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box;line-height: 28px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 18px;&quot; class=&quot;js_darkmode__300&quot;&gt;.NET 里常见的多线程与并发手段&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__301&quot;&gt;除 async/await 外，日常还会遇到：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__302&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__303&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// 1. 显式线程（较少手写，多用于特殊控制）&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__304&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;Thread&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Work&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Start&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// 2. 线程池 + Task.Run：把 CPU 密集或阻塞同步代码丢到后台&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__305&quot;&gt;await&lt;/span&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Run&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;HeavyCompute&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// 3. 并行库：多核同时算&lt;/span&gt;&lt;br/&gt;Parallel&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #986801;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;,&lt;/span&gt;&amp;nbsp;n&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;,&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Process&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;i&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// 4. 多个 I/O 并发：先启动多个 Task，再一起等（不是多线程并行算，是多个 I/O 同时进行）&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__306&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;t1&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url1&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__307&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;t2&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url2&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__308&quot;&gt;await&lt;/span&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WhenAll&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;t1&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;,&lt;/span&gt;&amp;nbsp;t2&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__309&quot;&gt;ASP.NET Core 本身在线程池上处理请求；开发者写&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__310&quot;&gt;async&lt;/code&gt;&amp;nbsp;接口，多数时候是在&lt;strong style=&quot;box-sizing: border-box;font-weight: 700;&quot;&gt;配合&lt;/strong&gt;这套线程池运转，而不是自己&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__311&quot;&gt;new Thread&lt;/code&gt;。真正主动开线程的场景，在典型 Web 业务里相对少，更多出现在 CPU 密集计算、后台消费队列、或必须把同步遗留 API 包一层的时候。&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box;line-height: 28px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 18px;&quot; class=&quot;js_darkmode__312&quot;&gt;二者如何配合&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__313&quot;&gt;async 与多线程并不互斥。常见组合是在 async 方法里&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__314&quot;&gt;await Task.Run(...)&lt;/code&gt;：外层用 async 保持接口非阻塞，内层用线程池跑一段 CPU 密集或无法改为 async 的同步代码。&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__315&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__316&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__317&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__318&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;&amp;nbsp;AnalyzeAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__319&quot;&gt;byte&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&amp;nbsp;data&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// I/O：async 原生支持，不占线程陪等&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__320&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;raw&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__321&quot;&gt;await&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetByteArrayAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: italic 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #708090;&quot;&gt;// CPU：占线程池线程计算，但通过 await 不阻塞调用链外的线程分配逻辑&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__322&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;score&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__323&quot;&gt;await&lt;/span&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;Run&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;ComputeScore&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;raw&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__324&quot;&gt;return&lt;/span&gt;&amp;nbsp;score&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__325&quot;&gt;这里&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__326&quot;&gt;GetByteArrayAsync&lt;/code&gt;&amp;nbsp;与&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__327&quot;&gt;Task.Run&lt;/code&gt;&amp;nbsp;返回的都是 Task，都可以&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__328&quot;&gt;await&lt;/code&gt;，但前者是 I/O 完成通知，后者是线程池执行委托。混用时需要分清各自语义。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__329&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__330&quot;&gt;同步阻塞与 async void&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__331&quot;&gt;在有&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__332&quot;&gt;SynchronizationContext&lt;/code&gt;&amp;nbsp;的环境（如 UI 线程、旧版 ASP.NET）中，对 async 方法返回的 Task 使用&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__333&quot;&gt;.Result&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__334&quot;&gt;.Wait()&lt;/code&gt;&amp;nbsp;可能造成死锁：调用线程阻塞等待 Task 完成，而 Task 的续体又需要调度回该线程，双方互相等待。ASP.NET Core 中此类死锁较少见，但&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__335&quot;&gt;.Result&lt;/code&gt;&amp;nbsp;仍会同步阻塞线程，损害高并发下的吞吐。从 API 入口到 I/O 调用，应尽可能保持 async 链路完整，避免在 async 代码中插入同步等待。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__336&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__337&quot;&gt;async void&lt;/code&gt;&amp;nbsp;仅适用于事件处理器等必须返回 void 的委托。业务与类库代码应返回&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__338&quot;&gt;Task&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__339&quot;&gt;Task&amp;lt;T&amp;gt;&lt;/code&gt;，否则调用方无法&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__340&quot;&gt;await&lt;/code&gt;，异常也难以被正常捕获与传播。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__341&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__342&quot;&gt;在 Web 后端中的意义&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__343&quot;&gt;ASP.NET Core 处理请求时，线程在&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__344&quot;&gt;await&lt;/code&gt;&amp;nbsp;数据库或 HTTP 操作期间不必阻塞。大量请求可以处于挂起状态，由少量线程轮转服务，从而在 I/O 密集型负载下提高吞吐。这并不缩短单次请求中纯 CPU 计算的耗时；CPU 密集工作仍应通过&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__345&quot;&gt;Task.Run&lt;/code&gt;、并行库或专门的设计来处理。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__346&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__347&quot;&gt;HttpClient 的使用方式&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__348&quot;&gt;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__349&quot;&gt;HttpClient&lt;/code&gt;&amp;nbsp;的异步方法与上述模型一致，但实例的生命周期需要单独注意。频繁&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__350&quot;&gt;new HttpClient()&lt;/code&gt;&amp;nbsp;并在使用后立即&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__351&quot;&gt;Dispose&lt;/code&gt;，可能导致 socket 与连接池行为异常。生产环境应通过依赖注入使用&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__352&quot;&gt;IHttpClientFactory&lt;/code&gt;：&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__353&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__354&quot;&gt;services&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;AddHttpClient&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__355&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__356&quot;&gt;&amp;nbsp;class&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&amp;nbsp;MyService&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__357&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__358&quot;&gt;&amp;nbsp;readonly&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&amp;nbsp;HttpClient&lt;/span&gt;&amp;nbsp;_httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__359&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;&amp;nbsp;MyService&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;HttpClient&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;_httpClient&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__360&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&amp;nbsp;Task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;lt;&lt;/span&gt;HttpResponseMessage&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__361&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&amp;nbsp;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;_httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__362&quot;&gt;由工厂统一管理连接池与 Handler 生命周期，与 ASP.NET Core 的 DI 体系一致。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__363&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__364&quot;&gt;概念对照&lt;/h2&gt;&lt;table width=&quot;656&quot;&gt;&lt;thead&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__365 firstRow&quot;&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__366&quot;&gt;&lt;section&gt;名称&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__367&quot;&gt;&lt;section&gt;职责&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;background-color: rgb(239, 243, 245);font-weight: 700;&quot; class=&quot;js_darkmode__368&quot;&gt;&lt;section&gt;非职责&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__369&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__370&quot;&gt;&lt;section&gt;Task&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__371&quot;&gt;&lt;section&gt;表示异步操作；供 await 与 WhenAll 使用&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__372&quot;&gt;&lt;section&gt;不等于 Thread&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__373&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__374&quot;&gt;&lt;section&gt;Task.Run&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__375&quot;&gt;&lt;section&gt;在线程池执行 CPU 或阻塞工作&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__376&quot;&gt;&lt;section&gt;不是 I/O 异步 API&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__377&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__378&quot;&gt;&lt;section&gt;GetAsync&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__379&quot;&gt;&lt;section&gt;发起 HTTP，立即返回 Task&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__380&quot;&gt;&lt;section&gt;不阻塞线程等待整个往返&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__381&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__382&quot;&gt;&lt;section&gt;async&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__383&quot;&gt;&lt;section&gt;状态机；可挂起；返回 Task&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__384&quot;&gt;&lt;section&gt;不发起 I/O、不自动并行&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(255, 255, 255);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__385&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__386&quot;&gt;&lt;section&gt;await&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__387&quot;&gt;&lt;section&gt;等待 Task；未完成时挂起方法&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__388&quot;&gt;&lt;section&gt;不是占线程忙等 I/O&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;background-color: rgb(247, 247, 247);border-width: 1px 0px 0px;border-style: solid none none;border-color: rgb(221, 221, 221) currentcolor currentcolor;border-image: none;&quot; class=&quot;js_darkmode__389&quot;&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__390&quot;&gt;&lt;section&gt;Thread / Task.Run / Parallel&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__391&quot;&gt;&lt;section&gt;多线程或线程池并行执行&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box;border: 1px solid rgb(221, 221, 221);padding: 8px;color: rgb(79, 79, 79);font-size: 14px;line-height: 22px;vertical-align: middle;word-break: normal !important;&quot; class=&quot;js_darkmode__392&quot;&gt;&lt;section&gt;不是 I/O 异步等待模型&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr style=&quot;box-sizing: border-box;height: 0px;overflow: visible;border-width: medium medium 1px;border-style: none none solid;border-color: currentcolor currentcolor rgb(221, 221, 221);border-image: none;margin: 24px 0px;&quot; class=&quot;js_darkmode__393&quot;/&gt;&lt;h2 style=&quot;box-sizing: border-box;line-height: 30px;margin: 24px 0px 8px;color: rgb(79, 79, 79);font-weight: 600;font-size: 20px;&quot; class=&quot;js_darkmode__394&quot;&gt;结语&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__395&quot;&gt;.NET 中的 async/await 并非多线程&lt;span class=&quot;&quot;&gt;语法糖&lt;/span&gt;，而是一套围绕 Task 构建的协作式异步模型。Task 描述一次操作及其完成方式；&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__396&quot;&gt;async&lt;/code&gt;&amp;nbsp;使方法能够挂起并以 Task 的形式对外暴露执行过程；&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__397&quot;&gt;await&lt;/code&gt;&amp;nbsp;在 Task 尚未完成时暂停当前方法，在 I/O 等待阶段释放线程，待操作完成后通过续体恢复执行。&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__398&quot;&gt;HttpClient.GetAsync&lt;/code&gt;&amp;nbsp;之类的 API 在操作系统层面发起 I/O 并立即返回 Task；是否等待、何时继续，则完全由代码中是否使用&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__399&quot;&gt;await&lt;/code&gt;&amp;nbsp;以及调用链上各层如何组合 Task 来决定。理解这套分工，比单独记忆关键字更为重要。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__400&quot;&gt;可以用以下代码验证上述顺序：先调用&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__401&quot;&gt;GetAsync&lt;/code&gt;&amp;nbsp;并打印&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__402&quot;&gt;IsCompleted&lt;/code&gt;（通常为&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__403&quot;&gt;false&lt;/code&gt;），再&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__404&quot;&gt;await&lt;/code&gt;&amp;nbsp;同一 Task，观察输出顺序与线程 Id 的变化。理论上的挂起与续体，会因此变得具体可感。&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;margin: 1.2em 0px 24px;color: rgb(0, 0, 0);line-height: 22px;&quot; class=&quot;js_darkmode__405&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgba(0, 0, 0, 0.05);border-radius: 2px;padding: 0.5em;color: unset;line-height: 22px;display: block;text-size-adjust: none;overflow-x: auto;&quot; class=&quot;js_darkmode__406&quot;&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__407&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;task&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&amp;nbsp;httpClient&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;GetAsync&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;url&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;$&amp;quot;2 IsCompleted=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;IsCompleted&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__408&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&amp;nbsp;response&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #A67F59;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #0077AA;&quot; class=&quot;js_darkmode__409&quot;&gt;await&lt;/span&gt;&amp;nbsp;task&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;Console&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #DD4A68;&quot;&gt;WriteLine&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;$&amp;quot;3 Thread=&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;&quot;&gt;Thread&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;CurrentThread&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;.&lt;/span&gt;ManagedThreadId&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #50A14F;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;font: 14px &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif !important;color: #999999;&quot;&gt;;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box;margin: 0px 0px 16px;color: rgb(77, 77, 77);font-size: 16px;font-weight: 400;line-height: 26px;overflow: auto hidden;&quot; class=&quot;js_darkmode__410&quot;&gt;输出顺序为&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__411&quot;&gt;1&lt;/code&gt;、&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__412&quot;&gt;2&lt;/code&gt;（且&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__413&quot;&gt;IsCompleted&lt;/code&gt;&amp;nbsp;为&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__414&quot;&gt;false&lt;/code&gt;）、等待片刻后&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__415&quot;&gt;3&lt;/code&gt;。第二节在 HTTP 完成之前执行，第三节在 Task 完成之后执行——这正是有无&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;font-family: &amp;quot;Source Code Pro&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, &amp;quot;Anonymous Pro&amp;quot;, &amp;quot;Droid Sans Mono&amp;quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif;font-size: 14px;background-color: rgb(249, 242, 244);border-radius: 2px;padding: 2px 4px;color: rgb(199, 37, 78);line-height: 22px;&quot; class=&quot;js_darkmode__416&quot;&gt;await&lt;/code&gt;&amp;nbsp;所改变的行为。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 11 Aug 2026 11:36:09 +0800</pubDate></item><item><title>ASP.NET Core 集成 NLog 完整入门</title><link>https://www.codepub.top/post/655.html</link><description>&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;在 ASP.NET Core 里配置 &lt;span class=&quot;&quot;&gt;NLog&lt;/span&gt; 本身不难，但足够多的配置选项和启动模式细节，足以绊倒有经验的开发者：到底用 XML 配置文件还是把一切写进 &lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;appsettings.json&lt;/code&gt;？进程退出时怎么保证日志刷盘？官方文档推荐的 &lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;try/catch/finally&lt;/code&gt; 模式到底解决什么问题？&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;Nick Cosentino（Dev Leader）2026 年 8 月的这篇文章，从零完整走了一遍 NLog 在 ASP.NET Core 里的设置流程：两种配置风格、Web 与 &lt;span class=&quot;&quot;&gt;Worker Service&lt;/span&gt; 各自的启动/关闭模式，以及最实用的一组基线配置。读完你就能得到一份可以直接放进 .NET 8 项目的生产级 NLog 配置。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;本文按同样的顺序整理为中文教程，并核对了 NuGet 上的最新包版本（NLog 6.1.4 / NLog.Web.AspNetCore 6.1.4）。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0px 0.65em; font-size: 22px; line-height: 1.35; font-weight: 700; color: rgb(26, 32, 44); border-bottom: 2px solid rgb(226, 232, 240); padding-bottom: 0.35em; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;前置条件&lt;/h2&gt;&lt;p style=&quot;margin: 0.35em 0px; visibility: visible;&quot;&gt;• .NET 8 SDK 或更高版本&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0px; visibility: visible;&quot;&gt;• 一个 ASP.NET Core Web API、Blazor 或 Worker Service 项目&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0px; visibility: visible;&quot;&gt;• NuGet 访问权限&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0px; visibility: visible;&quot;&gt;• 本教程不需要第三方日志服务器——目标只有文件和控制台。系列后续文章会覆盖 &lt;span class=&quot;&quot;&gt;Seq&lt;/span&gt;、Elasticsearch 和自定义 target&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;对 .NET 日志的整体背景还不熟悉的读者，建议先读作者的 Logging in .NET: The Complete Developer&amp;#39;s Guide。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0px 0.65em; font-size: 22px; line-height: 1.35; font-weight: 700; color: rgb(26, 32, 44); border-bottom: 2px solid rgb(226, 232, 240); padding-bottom: 0.35em; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;安装 NLog&lt;/h2&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;ASP.NET Core 项目一个包就够：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0px; padding: 1.2em 1.5em; border-radius: 12px; overflow-x: auto; background: rgb(17, 24, 39); color: rgb(243, 244, 246); font-size: 13.5px; line-height: 1.65; white-space: pre; word-break: normal; overflow-wrap: normal; tab-size: 4; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;dotnet&amp;nbsp;add&amp;nbsp;package&amp;nbsp;NLog.Web.AspNetCore&lt;/pre&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;它会自动拉入基础 &lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;NLog&lt;/code&gt; 包作为依赖，并额外提供：&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0px; visibility: visible;&quot;&gt;• &lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;UseNLog()&lt;/code&gt; 主机构建扩展&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0px; visibility: visible;&quot;&gt;• ASP.NET Core 感知的 layout renderers（&lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;${aspnet-request-url}&lt;/code&gt;、&lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;${aspnet-mvc-action}&lt;/code&gt;、&lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;${aspnet-TraceIdentifier}&lt;/code&gt; 等）&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0px; visibility: visible;&quot;&gt;• 与 &lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;Microsoft.Extensions.Logging&lt;/code&gt; 的集成&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;Worker Service 或不需要 HTTP 感知 renderers 的控制台应用，则安装：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0px; padding: 1.2em 1.5em; border-radius: 12px; overflow-x: auto; background: rgb(17, 24, 39); color: rgb(243, 244, 246); font-size: 13.5px; line-height: 1.65; white-space: pre; word-break: normal; overflow-wrap: normal; tab-size: 4; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;dotnet&amp;nbsp;add&amp;nbsp;package&amp;nbsp;NLog
dotnet&amp;nbsp;add&amp;nbsp;package&amp;nbsp;NLog.Extensions.Logging&lt;/pre&gt;&lt;h2 style=&quot;margin: 1.3em 0px 0.65em; font-size: 22px; line-height: 1.35; font-weight: 700; color: rgb(26, 32, 44); border-bottom: 2px solid rgb(226, 232, 240); padding-bottom: 0.35em; visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;两种配置方式&lt;/h2&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;NLog 支持两种配置风格，可以在任何时候切换（或组合），无需改动应用程序代码。&lt;/p&gt;&lt;h3 style=&quot;margin: 1.2em 0px 0.6em; font-size: 18px; line-height: 1.4; font-weight: 700; color: rgb(37, 99, 235); visibility: visible;&quot;&gt;方式一：nlog.config（XML）&lt;/h3&gt;&lt;p style=&quot;margin: 0.7em 0px; visibility: visible;&quot;&gt;在项目根目录创建 &lt;code style=&quot;padding: 0.15em 0.38em; border-radius: 4px; background: rgb(238, 242, 247); color: rgb(192, 57, 43); font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 0.89em; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__14&quot;&gt;nlog.config&lt;/code&gt;：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0px; padding: 1.2em 1.5em; border-radius: 12px; overflow-x: auto; background: rgb(17, 24, 39); color: rgb(243, 244, 246); font-size: 13.5px; line-height: 1.65; white-space: pre; word-break: normal; overflow-wrap: normal; tab-size: 4; visibility: visible;&quot; class=&quot;js_darkmode__15&quot;&gt;&amp;lt;?xml&amp;nbsp;version=&amp;quot;1.0&amp;quot;&amp;nbsp;encoding=&amp;quot;utf-8&amp;quot;&amp;nbsp;?&amp;gt;
&amp;lt;nlog&amp;nbsp;xmlns=&amp;quot;http://www.nlog-project.org/schemas/NLog.xsd&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;autoReload=&amp;quot;true&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throwConfigExceptions=&amp;quot;true&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;internalLogLevel=&amp;quot;Warn&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;internalLogFile=&amp;quot;${basedir}/internal-nlog.txt&amp;quot;&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;lt;targets&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--&amp;nbsp;Async&amp;nbsp;wrapper&amp;nbsp;prevents&amp;nbsp;logging&amp;nbsp;from&amp;nbsp;blocking&amp;nbsp;request&amp;nbsp;threads&amp;nbsp;--&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;target&amp;nbsp;xsi:type=&amp;quot;AsyncWrapper&amp;quot;&amp;nbsp;name=&amp;quot;asyncFile&amp;quot;&amp;nbsp;queueLimit=&amp;quot;5000&amp;quot;&amp;nbsp;overflowAction=&amp;quot;Discard&amp;quot;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;target&amp;nbsp;xsi:type=&amp;quot;File&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name=&amp;quot;logfile&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileName=&amp;quot;${basedir}/logs/app-${shortdate}.log&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;archiveFileName=&amp;quot;${basedir}/logs/archives/app-{#}.log&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;archiveEvery=&amp;quot;Day&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;archiveNumbering=&amp;quot;Rolling&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;maxArchiveFiles=&amp;quot;14&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout=&amp;quot;${longdate}|${uppercase:${level}}|${logger}|${message}&amp;nbsp;${exception:format=tostring}&amp;quot;&amp;nbsp;/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/target&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;target&amp;nbsp;xsi:type=&amp;quot;Console&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name=&amp;quot;console&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layout=&amp;quot;${level:truncate=4:uppercase=true}|${logger:shortName=true}|${message}&amp;nbsp;${exception:format=message}&amp;quot;&amp;nbsp;/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/targets&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;lt;rules&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--&amp;nbsp;Silence&amp;nbsp;noisy&amp;nbsp;framework&amp;nbsp;loggers&amp;nbsp;at&amp;nbsp;Info&amp;nbsp;and&amp;nbsp;below;&amp;nbsp;final&amp;nbsp;stops&amp;nbsp;further&amp;nbsp;evaluation&amp;nbsp;--&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;logger&amp;nbsp;name=&amp;quot;Microsoft.*&amp;quot;&amp;nbsp;maxlevel=&amp;quot;Info&amp;quot;&amp;nbsp;final=&amp;quot;true&amp;quot;&amp;nbsp;/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;logger&amp;nbsp;name=&amp;quot;System.Net.Http.*&amp;quot;&amp;nbsp;maxlevel=&amp;quot;Info&amp;quot;&amp;nbsp;final=&amp;quot;true&amp;quot;&amp;nbsp;/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--&amp;nbsp;All&amp;nbsp;other&amp;nbsp;loggers:&amp;nbsp;Debug&amp;nbsp;and&amp;nbsp;above&amp;nbsp;--&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;logger&amp;nbsp;name=&amp;quot;*&amp;quot;&amp;nbsp;minlevel=&amp;quot;Debug&amp;quot;&amp;nbsp;writeTo=&amp;quot;asyncFile,console&amp;quot;&amp;nbsp;/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/rules&amp;gt;
&amp;lt;/nlog&amp;gt;&lt;/pre&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;然后在 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__16&quot;&gt;.csproj&lt;/code&gt; 里注册文件复制到输出目录：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0;padding: 1.2em 1.5em;border-radius: 12px;overflow-x: auto;-webkit-overflow-scrolling: touch;background: #111827;color: #f3f4f6;font-size: 13.5px;line-height: 1.65;white-space: pre;word-break: normal;word-wrap: normal;overflow-wrap: normal;tab-size: 4;-moz-tab-size: 4;&quot; class=&quot;js_darkmode__17&quot;&gt;&amp;lt;ItemGroup&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;Content&amp;nbsp;Include=&amp;quot;nlog.config&amp;quot;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;CopyToOutputDirectory&amp;gt;Always&amp;lt;/CopyToOutputDirectory&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/Content&amp;gt;
&amp;lt;/ItemGroup&amp;gt;&lt;/pre&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;根元素 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__18&quot;&gt;&amp;lt;nlog&amp;gt;&lt;/code&gt; 上的关键属性：&lt;/p&gt;&lt;table width=&quot;100&quot;&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;background: #edf2fb;text-align: left;font-weight: 700;&quot; class=&quot;js_darkmode__19&quot;&gt;属性&lt;/th&gt;&lt;th style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;background: #edf2fb;text-align: left;font-weight: 700;&quot; class=&quot;js_darkmode__20&quot;&gt;作用&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__22&quot;&gt;autoReload=&amp;quot;true&amp;quot;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__23&quot;&gt;热重载配置变更，无需重启应用&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__25&quot;&gt;throwConfigExceptions=&amp;quot;true&amp;quot;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__26&quot;&gt;配置出错时直接抛异常，而不是静默失败&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__28&quot;&gt;internalLogLevel=&amp;quot;Warn&amp;quot;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__29&quot;&gt;NLog 自身诊断日志的级别&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__31&quot;&gt;internalLogFile&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__32&quot;&gt;NLog 记录自身消息的位置（与应用日志分开）&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;开发期间&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__33&quot;&gt;务必设置 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__34&quot;&gt;throwConfigExceptions=&amp;quot;true&amp;quot;&lt;/code&gt;&lt;/strong&gt;。静默的配置失败极难排查——你只会奇怪为什么没有任何日志出现。&lt;/p&gt;&lt;h3 style=&quot;margin: 1.2em 0 0.6em;font-size: 18px;line-height: 1.4;font-weight: 700;color: #2563eb;&quot;&gt;方式二：appsettings.json&lt;/h3&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;如果团队倾向于把所有配置集中到 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__35&quot;&gt;appsettings.json&lt;/code&gt;：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0;padding: 1.2em 1.5em;border-radius: 12px;overflow-x: auto;-webkit-overflow-scrolling: touch;background: #111827;color: #f3f4f6;font-size: 13.5px;line-height: 1.65;white-space: pre;word-break: normal;word-wrap: normal;overflow-wrap: normal;tab-size: 4;-moz-tab-size: 4;&quot; class=&quot;js_darkmode__36&quot;&gt;{
&amp;nbsp;&amp;nbsp;&amp;quot;Logging&amp;quot;:&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;LogLevel&amp;quot;:&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;Default&amp;quot;:&amp;nbsp;&amp;quot;Information&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;Microsoft.AspNetCore&amp;quot;:&amp;nbsp;&amp;quot;Warning&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;},
&amp;nbsp;&amp;nbsp;&amp;quot;NLog&amp;quot;:&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;autoReload&amp;quot;:&amp;nbsp;true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;throwConfigExceptions&amp;quot;:&amp;nbsp;true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;internalLogLevel&amp;quot;:&amp;nbsp;&amp;quot;Warn&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;extensions&amp;quot;:&amp;nbsp;[{&amp;nbsp;&amp;quot;assembly&amp;quot;:&amp;nbsp;&amp;quot;NLog.Web.AspNetCore&amp;quot;&amp;nbsp;}],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;targets&amp;quot;:&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;async&amp;quot;:&amp;nbsp;true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;logfile&amp;quot;:&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;type&amp;quot;:&amp;nbsp;&amp;quot;File&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;fileName&amp;quot;:&amp;nbsp;&amp;quot;${basedir}/logs/app-${shortdate}.log&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;archiveFileName&amp;quot;:&amp;nbsp;&amp;quot;${basedir}/logs/archives/app-{#}.log&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;archiveEvery&amp;quot;:&amp;nbsp;&amp;quot;Day&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;archiveNumbering&amp;quot;:&amp;nbsp;&amp;quot;Rolling&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;maxArchiveFiles&amp;quot;:&amp;nbsp;14,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;layout&amp;quot;:&amp;nbsp;&amp;quot;${longdate}|${uppercase:${level}}|${logger}|${message}&amp;nbsp;${exception:format=tostring}&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;console&amp;quot;:&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;type&amp;quot;:&amp;nbsp;&amp;quot;Console&amp;quot;,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;layout&amp;quot;:&amp;nbsp;&amp;quot;${level:truncate=4:uppercase=true}|${logger:shortName=true}|${message}&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;rules&amp;quot;:&amp;nbsp;[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;quot;logger&amp;quot;:&amp;nbsp;&amp;quot;Microsoft.*&amp;quot;,&amp;nbsp;&amp;quot;maxLevel&amp;quot;:&amp;nbsp;&amp;quot;Info&amp;quot;,&amp;nbsp;&amp;quot;final&amp;quot;:&amp;nbsp;true&amp;nbsp;},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;quot;logger&amp;quot;:&amp;nbsp;&amp;quot;System.Net.Http.*&amp;quot;,&amp;nbsp;&amp;quot;maxLevel&amp;quot;:&amp;nbsp;&amp;quot;Info&amp;quot;,&amp;nbsp;&amp;quot;final&amp;quot;:&amp;nbsp;true&amp;nbsp;},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;quot;logger&amp;quot;:&amp;nbsp;&amp;quot;*&amp;quot;,&amp;nbsp;&amp;quot;minLevel&amp;quot;:&amp;nbsp;&amp;quot;Debug&amp;quot;,&amp;nbsp;&amp;quot;writeTo&amp;quot;:&amp;nbsp;&amp;quot;logfile,console&amp;quot;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]
&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;注意 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__37&quot;&gt;targets&lt;/code&gt; 块里的 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__38&quot;&gt;&amp;quot;async&amp;quot;: true&lt;/code&gt;——这是 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__39&quot;&gt;appsettings.json&lt;/code&gt; 中等价于把所有 target 包进 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__40&quot;&gt;AsyncWrapper&lt;/code&gt; 的写法，一个设置即可让配置中的每个 target &lt;span class=&quot;&quot;&gt;异步写入&lt;/span&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;还可以创建一个 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__41&quot;&gt;appsettings.Development.json&lt;/code&gt;，只在本地把最小日志级别覆盖为 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__42&quot;&gt;Trace&lt;/code&gt;，不动生产配置：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0;padding: 1.2em 1.5em;border-radius: 12px;overflow-x: auto;-webkit-overflow-scrolling: touch;background: #111827;color: #f3f4f6;font-size: 13.5px;line-height: 1.65;white-space: pre;word-break: normal;word-wrap: normal;overflow-wrap: normal;tab-size: 4;-moz-tab-size: 4;&quot; class=&quot;js_darkmode__43&quot;&gt;{
&amp;nbsp;&amp;nbsp;&amp;quot;NLog&amp;quot;:&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;rules&amp;quot;:&amp;nbsp;[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;quot;logger&amp;quot;:&amp;nbsp;&amp;quot;Microsoft.*&amp;quot;,&amp;nbsp;&amp;quot;maxLevel&amp;quot;:&amp;nbsp;&amp;quot;Info&amp;quot;,&amp;nbsp;&amp;quot;final&amp;quot;:&amp;nbsp;true&amp;nbsp;},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;quot;logger&amp;quot;:&amp;nbsp;&amp;quot;*&amp;quot;,&amp;nbsp;&amp;quot;minLevel&amp;quot;:&amp;nbsp;&amp;quot;Trace&amp;quot;,&amp;nbsp;&amp;quot;writeTo&amp;quot;:&amp;nbsp;&amp;quot;logfile,console&amp;quot;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]
&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;&lt;h2 style=&quot;margin: 1.3em 0 0.65em;font-size: 22px;line-height: 1.35;font-weight: 700;color: #1a202c;border-bottom: 2px solid #e2e8f0;padding-bottom: 0.35em;&quot; class=&quot;js_darkmode__44&quot;&gt;Program.cs 启动设置：ASP.NET Core（.NET 8）&lt;/h2&gt;&lt;h3 style=&quot;margin: 1.2em 0 0.6em;font-size: 18px;line-height: 1.4;font-weight: 700;color: #2563eb;&quot;&gt;使用 XML 配置文件&lt;/h3&gt;&lt;pre style=&quot;margin: 1.4em 0;padding: 1.2em 1.5em;border-radius: 12px;overflow-x: auto;-webkit-overflow-scrolling: touch;background: #111827;color: #f3f4f6;font-size: 13.5px;line-height: 1.65;white-space: pre;word-break: normal;word-wrap: normal;overflow-wrap: normal;tab-size: 4;-moz-tab-size: 4;&quot; class=&quot;js_darkmode__45&quot;&gt;using&amp;nbsp;NLog.Web;

//&amp;nbsp;Get&amp;nbsp;a&amp;nbsp;logger&amp;nbsp;for&amp;nbsp;startup&amp;nbsp;errors&amp;nbsp;before&amp;nbsp;DI&amp;nbsp;is&amp;nbsp;initialized
var&amp;nbsp;logger&amp;nbsp;=&amp;nbsp;NLogBuilder
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.ConfigureNLog(&amp;quot;nlog.config&amp;quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.GetCurrentClassLogger();

try
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;builder&amp;nbsp;=&amp;nbsp;WebApplication.CreateBuilder(args);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Replace&amp;nbsp;the&amp;nbsp;default&amp;nbsp;logging&amp;nbsp;providers&amp;nbsp;with&amp;nbsp;NLog
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;builder.Logging.ClearProviders();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;builder.Host.UseNLog();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;builder.Services.AddControllers();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;builder.Services.AddEndpointsApiExplorer();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;app&amp;nbsp;=&amp;nbsp;builder.Build();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;app.UseHttpsRedirection();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;app.MapControllers();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;app.Run();
}
catch&amp;nbsp;(Exception&amp;nbsp;ex)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Log&amp;nbsp;startup&amp;nbsp;failures&amp;nbsp;before&amp;nbsp;the&amp;nbsp;host&amp;nbsp;starts
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.Fatal(ex,&amp;nbsp;&amp;quot;Application&amp;nbsp;startup&amp;nbsp;failed&amp;quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw;
}
finally
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Flush&amp;nbsp;and&amp;nbsp;close&amp;nbsp;all&amp;nbsp;targets.&amp;nbsp;Closing&amp;nbsp;a&amp;nbsp;target&amp;nbsp;flushes&amp;nbsp;its&amp;nbsp;internal&amp;nbsp;buffer.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NLog.LogManager.Shutdown();
}&lt;/pre&gt;&lt;h3 style=&quot;margin: 1.2em 0 0.6em;font-size: 18px;line-height: 1.4;font-weight: 700;color: #2563eb;&quot;&gt;使用 appsettings.json 配置&lt;/h3&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;采用 JSON 配置时，NLog 会从 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__46&quot;&gt;IConfiguration&lt;/code&gt; 自动发现配置，&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__47&quot;&gt;不需要显式调用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__48&quot;&gt;ConfigureNLog&lt;/code&gt;&lt;/strong&gt;：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0;padding: 1.2em 1.5em;border-radius: 12px;overflow-x: auto;-webkit-overflow-scrolling: touch;background: #111827;color: #f3f4f6;font-size: 13.5px;line-height: 1.65;white-space: pre;word-break: normal;word-wrap: normal;overflow-wrap: normal;tab-size: 4;-moz-tab-size: 4;&quot; class=&quot;js_darkmode__49&quot;&gt;using&amp;nbsp;NLog.Web;

var&amp;nbsp;builder&amp;nbsp;=&amp;nbsp;WebApplication.CreateBuilder(args);

builder.Logging.ClearProviders();
builder.Host.UseNLog();

builder.Services.AddControllers();

var&amp;nbsp;app&amp;nbsp;=&amp;nbsp;builder.Build();
app.MapControllers();
app.Run();&lt;/pre&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;如果想捕获启动前的错误，同样可以加上外层 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__50&quot;&gt;try/catch/finally&lt;/code&gt;，手动创建的 logger 用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__51&quot;&gt;NLog.LogManager.Setup().LoadConfigurationFromAppSettings()&lt;/code&gt; 加载配置。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0 0.65em;font-size: 22px;line-height: 1.35;font-weight: 700;color: #1a202c;border-bottom: 2px solid #e2e8f0;padding-bottom: 0.35em;&quot; class=&quot;js_darkmode__52&quot;&gt;Worker Service 的接入方式&lt;/h2&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;Worker Service 使用不同的主机构建器，NLog 的设置思路相同：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0;padding: 1.2em 1.5em;border-radius: 12px;overflow-x: auto;-webkit-overflow-scrolling: touch;background: #111827;color: #f3f4f6;font-size: 13.5px;line-height: 1.65;white-space: pre;word-break: normal;word-wrap: normal;overflow-wrap: normal;tab-size: 4;-moz-tab-size: 4;&quot; class=&quot;js_darkmode__53&quot;&gt;using&amp;nbsp;NLog.Web;

var&amp;nbsp;builder&amp;nbsp;=&amp;nbsp;Host.CreateApplicationBuilder(args);

builder.Logging.ClearProviders();
builder.Logging.AddNLog();&amp;nbsp;&amp;nbsp;//&amp;nbsp;Use&amp;nbsp;AddNLog()&amp;nbsp;for&amp;nbsp;non-web&amp;nbsp;hosts

builder.Services.AddHostedService&amp;lt;OrderProcessingWorker&amp;gt;();

var&amp;nbsp;host&amp;nbsp;=&amp;nbsp;builder.Build();

try
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;host.Run();
}
finally
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NLog.LogManager.Shutdown();
}&lt;/pre&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;关键区别：Worker Service 需要安装 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__54&quot;&gt;NLog.Extensions.Logging&lt;/code&gt;，并在 logging builder 上调用 &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__55&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__56&quot;&gt;AddNLog()&lt;/code&gt;&lt;/strong&gt; 而不是 host 上的 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__57&quot;&gt;UseNLog()&lt;/code&gt;——&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__58&quot;&gt;UseNLog()&lt;/code&gt; 是 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__59&quot;&gt;IHostBuilder&lt;/code&gt; Web 变体专用的。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0 0.65em;font-size: 22px;line-height: 1.35;font-weight: 700;color: #1a202c;border-bottom: 2px solid #e2e8f0;padding-bottom: 0.35em;&quot; class=&quot;js_darkmode__60&quot;&gt;注入和使用 ILogger&lt;/h2&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;注册完成后，像使用任何其他 provider 一样注入 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__61&quot;&gt;ILogger&amp;lt;T&amp;gt;&lt;/code&gt; 即可：&lt;/p&gt;&lt;pre style=&quot;margin: 1.4em 0;padding: 1.2em 1.5em;border-radius: 12px;overflow-x: auto;-webkit-overflow-scrolling: touch;background: #111827;color: #f3f4f6;font-size: 13.5px;line-height: 1.65;white-space: pre;word-break: normal;word-wrap: normal;overflow-wrap: normal;tab-size: 4;-moz-tab-size: 4;&quot; class=&quot;js_darkmode__62&quot;&gt;public&amp;nbsp;sealed&amp;nbsp;class&amp;nbsp;OrderController&amp;nbsp;:&amp;nbsp;ControllerBase
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private&amp;nbsp;readonly&amp;nbsp;ILogger&amp;lt;OrderController&amp;gt;&amp;nbsp;_logger;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private&amp;nbsp;readonly&amp;nbsp;IOrderService&amp;nbsp;_orderService;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;OrderController(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ILogger&amp;lt;OrderController&amp;gt;&amp;nbsp;logger,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IOrderService&amp;nbsp;orderService)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_logger&amp;nbsp;=&amp;nbsp;logger;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_orderService&amp;nbsp;=&amp;nbsp;orderService;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[HttpPost(&amp;quot;{orderId}/process&amp;quot;)]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;async&amp;nbsp;Task&amp;lt;IActionResult&amp;gt;&amp;nbsp;ProcessOrder(int&amp;nbsp;orderId)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_logger.LogInformation(&amp;quot;Received&amp;nbsp;request&amp;nbsp;to&amp;nbsp;process&amp;nbsp;order&amp;nbsp;{OrderId}&amp;quot;,&amp;nbsp;orderId);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await&amp;nbsp;_orderService.ProcessAsync(orderId);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_logger.LogInformation(&amp;quot;Order&amp;nbsp;{OrderId}&amp;nbsp;processed&amp;nbsp;successfully&amp;quot;,&amp;nbsp;orderId);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;Ok();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch&amp;nbsp;(OrderNotFoundException&amp;nbsp;ex)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_logger.LogWarning(ex,&amp;nbsp;&amp;quot;Order&amp;nbsp;{OrderId}&amp;nbsp;not&amp;nbsp;found&amp;quot;,&amp;nbsp;orderId);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;NotFound();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch&amp;nbsp;(Exception&amp;nbsp;ex)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_logger.LogError(ex,&amp;nbsp;&amp;quot;Unexpected&amp;nbsp;error&amp;nbsp;processing&amp;nbsp;order&amp;nbsp;{OrderId}&amp;quot;,&amp;nbsp;orderId);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;StatusCode(500);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;务必使用&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__63&quot;&gt;消息模板语法&lt;/strong&gt;——&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__64&quot;&gt;{OrderId}&lt;/code&gt; 而不是 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__65&quot;&gt;$&amp;quot;Order {orderId}&amp;quot;&lt;/code&gt;。字符串插值会把结构化属性折叠进消息字符串；模板语法则把 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__66&quot;&gt;OrderId&lt;/code&gt; 保留为独立的命名值，Seq、&lt;span class=&quot;&quot;&gt;Elasticsearch&lt;/span&gt; 等结构化日志 target 可以单独索引和过滤。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0 0.65em;font-size: 22px;line-height: 1.35;font-weight: 700;color: #1a202c;border-bottom: 2px solid #e2e8f0;padding-bottom: 0.35em;&quot; class=&quot;js_darkmode__67&quot;&gt;验证设置是否生效&lt;/h2&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;运行应用后检查四项：&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;1. &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__68&quot;&gt;日志文件出现&lt;/strong&gt;——查看 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__69&quot;&gt;${basedir}/logs/&lt;/code&gt;（默认是项目输出目录）&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;2. &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__70&quot;&gt;控制台输出&lt;/strong&gt;——应看到 NLog 格式的输出，而不是 ASP.NET Core 默认格式&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;3. &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__71&quot;&gt;框架日志被静音&lt;/strong&gt;——&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__72&quot;&gt;Microsoft.*&lt;/code&gt; 和 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__73&quot;&gt;System.Net.Http.*&lt;/code&gt; 规则应显著减少噪音&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;4. &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__74&quot;&gt;内部日志干净&lt;/strong&gt;——检查 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__75&quot;&gt;internal-nlog.txt&lt;/code&gt; 里 NLog 自身的诊断消息，任何错误都说明配置有问题&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;如果没有任何日志出现，&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__76&quot;&gt;先查 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__77&quot;&gt;internal-nlog.txt&lt;/code&gt;&lt;/strong&gt;。&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__78&quot;&gt;throwConfigExceptions=&amp;quot;true&amp;quot;&lt;/code&gt; 会在启动时暴露错误，但内部日志会捕获 NLog 初始化后记录的一切。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0 0.65em;font-size: 22px;line-height: 1.35;font-weight: 700;color: #1a202c;border-bottom: 2px solid #e2e8f0;padding-bottom: 0.35em;&quot; class=&quot;js_darkmode__79&quot;&gt;配置最佳实践&lt;/h2&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;• &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__80&quot;&gt;开发环境始终设置 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__81&quot;&gt;throwConfigExceptions=&amp;quot;true&amp;quot;&lt;/code&gt;&lt;/strong&gt;。NLog 配置静默失败意味着应用正常启动但什么都不记，开发期要让失败大声一点。&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;• &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__82&quot;&gt;所有环境都开 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__83&quot;&gt;autoReload=&amp;quot;true&amp;quot;&lt;/code&gt;&lt;/strong&gt;。运行时调整日志级别和 target 的能力在生产环境极有价值——排查问题时临时提高详细程度，不用重启。&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;• &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__84&quot;&gt;在 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__85&quot;&gt;finally&lt;/code&gt; 里总是调用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__86&quot;&gt;NLog.LogManager.Shutdown()&lt;/code&gt;&lt;/strong&gt;。NLog 内部使用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__87&quot;&gt;AsyncWrapper&lt;/code&gt;，没有 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__88&quot;&gt;Shutdown()&lt;/code&gt;，进程退出时缓冲中的日志条目可能永远到不了 target。&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;• &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__89&quot;&gt;显式静音 Microsoft 框架日志&lt;/strong&gt;。带 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__90&quot;&gt;final=&amp;quot;true&amp;quot;&lt;/code&gt; 的 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__91&quot;&gt;Microsoft.*&lt;/code&gt; 和 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__92&quot;&gt;System.Net.Http.*&lt;/code&gt; 规则，防止 EF Core 查询日志和 HTTP 客户端追踪以 MB 为单位淹没你的应用日志。&lt;/p&gt;&lt;p style=&quot;margin: 0.35em 0;&quot;&gt;• &lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__93&quot;&gt;开发专属覆盖放 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__94&quot;&gt;appsettings.Development.json&lt;/code&gt;&lt;/strong&gt;。不要在生成配置里降低最小日志级别，只为本机开发覆盖。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0 0.65em;font-size: 22px;line-height: 1.35;font-weight: 700;color: #1a202c;border-bottom: 2px solid #e2e8f0;padding-bottom: 0.35em;&quot; class=&quot;js_darkmode__95&quot;&gt;与 Serilog 设置对比&lt;/h2&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;如果之前配过 Serilog，两者的结构差异如下：&lt;/p&gt;&lt;table width=&quot;100&quot;&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;background: #edf2fb;text-align: left;font-weight: 700;&quot; class=&quot;js_darkmode__96&quot;&gt;&lt;br/&gt;&lt;/th&gt;&lt;th style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;background: #edf2fb;text-align: left;font-weight: 700;&quot; class=&quot;js_darkmode__97&quot;&gt;NLog&lt;/th&gt;&lt;th style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;background: #edf2fb;text-align: left;font-weight: 700;&quot; class=&quot;js_darkmode__98&quot;&gt;Serilog&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__99&quot;&gt;配置风格&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__100&quot;&gt;XML 文件或 JSON 节&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__101&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__102&quot;&gt;Program.cs&lt;/code&gt; 里的 C# fluent API&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__103&quot;&gt;ASP.NET Core 集成&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__104&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__105&quot;&gt;builder.Host.UseNLog()&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__106&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__107&quot;&gt;builder.Host.UseSerilog()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__108&quot;&gt;关闭刷盘&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__109&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__110&quot;&gt;LogManager.Shutdown()&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__111&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__112&quot;&gt;Log.CloseAndFlush()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__113&quot;&gt;异步日志&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__114&quot;&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__115&quot;&gt;AsyncWrapper&lt;/code&gt; target 或 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__116&quot;&gt;async=true&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding: 0.75em;border: 1px solid #d9e0ea;text-align: left;vertical-align: top;&quot; class=&quot;js_darkmode__117&quot;&gt;异步 sink 因包而异&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;从应用代码的视角看，两者对 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__118&quot;&gt;ILogger&amp;lt;T&amp;gt;&lt;/code&gt; 的集成方式完全一致。想直接对比 Serilog 的等价设置，可参考作者的 How to Set Up Serilog in ASP.NET Core: Step-by-Step Guide。&lt;/p&gt;&lt;h2 style=&quot;margin: 1.3em 0 0.65em;font-size: 22px;line-height: 1.35;font-weight: 700;color: #1a202c;border-bottom: 2px solid #e2e8f0;padding-bottom: 0.35em;&quot; class=&quot;js_darkmode__119&quot;&gt;常见问题&lt;/h2&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__120&quot;&gt;ASP.NET Core 里用 NLog 需要哪个包？&lt;/strong&gt;&lt;br/&gt;&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__121&quot;&gt;NLog.Web.AspNetCore&lt;/code&gt;。这一个包提供 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__122&quot;&gt;UseNLog()&lt;/code&gt; 主机扩展、&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__123&quot;&gt;${aspnet-*}&lt;/code&gt; HTTP 请求上下文 renderers 和 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__124&quot;&gt;Microsoft.Extensions.Logging&lt;/code&gt; 集成，基础 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__125&quot;&gt;NLog&lt;/code&gt; 包作为依赖自动引入。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__126&quot;&gt;应该用 nlog.config 还是 appsettings.json？&lt;/strong&gt;&lt;br/&gt;两者效果相同。想要与应用设置完全分离、可热重载的配置，或团队已熟悉 XML 风格，用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__127&quot;&gt;nlog.config&lt;/code&gt;；想集中所有配置并利用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__128&quot;&gt;appsettings.Development.json&lt;/code&gt; 或环境变量做环境覆盖，用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__129&quot;&gt;appsettings.json&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__130&quot;&gt;为什么需要 Program.cs 里的 try/catch/finally 模式？&lt;/strong&gt;&lt;br/&gt;双重目的：&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__131&quot;&gt;catch&lt;/code&gt; 块记录 DI 容器初始化之前发生的致命启动错误（否则这些异常可能无人记录）；&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__132&quot;&gt;finally&lt;/code&gt; 里的 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__133&quot;&gt;NLog.LogManager.Shutdown()&lt;/code&gt; 确保 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__134&quot;&gt;AsyncWrapper&lt;/code&gt; 等缓冲 target 中的日志在进程退出前刷盘。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__135&quot;&gt;怎么阻止 NLog 记录嘈杂的 Microsoft 框架消息？&lt;/strong&gt;&lt;br/&gt;在规则列表顶部为 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__136&quot;&gt;Microsoft.*&lt;/code&gt; 和 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__137&quot;&gt;System.Net.Http.*&lt;/code&gt; 添加 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__138&quot;&gt;final=&amp;quot;true&amp;quot;&lt;/code&gt; 的规则。&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__139&quot;&gt;final=&amp;quot;true&amp;quot;&lt;/code&gt; 会在匹配后停止后续规则求值，静音 EF Core SQL 查询日志、HTTP 客户端请求细节等冗长框架输出，不影响应用日志。想保留 Warning 及以上消息就把 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__140&quot;&gt;maxlevel&lt;/code&gt; 调到 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__141&quot;&gt;Warn&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__142&quot;&gt;NLog 支持 .NET 8 minimal API 吗？&lt;/strong&gt;&lt;br/&gt;支持。&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__143&quot;&gt;builder.Logging.ClearProviders()&lt;/code&gt; 和 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__144&quot;&gt;builder.Host.UseNLog()&lt;/code&gt; 在 controller 和 minimal API 路由下工作方式完全一样，注入到端点处理器或服务里的 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__145&quot;&gt;ILogger&amp;lt;T&amp;gt;&lt;/code&gt; 由 NLog 提供。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__146&quot;&gt;internal-nlog.txt 是干什么的？&lt;/strong&gt;&lt;br/&gt;NLog 的自诊断日志，记录配置解析错误、target 写入失败等 NLog 内部事件。应用日志不符合预期时，这是第一个该看的地方。生产环境把 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__147&quot;&gt;internalLogLevel&lt;/code&gt; 设为 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__148&quot;&gt;Warn&lt;/code&gt; 保持安静。&lt;/p&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;&lt;strong style=&quot;font-weight: 700;color: #18202a;&quot; class=&quot;js_darkmode__149&quot;&gt;如何区分 Development 和 Production 的 NLog 配置？&lt;/strong&gt;&lt;br/&gt;用 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__150&quot;&gt;appsettings.Development.json&lt;/code&gt; 覆盖 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__151&quot;&gt;NLog&lt;/code&gt; 节：比如本地把最小日志级别从 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__152&quot;&gt;Info&lt;/code&gt; 降到 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__153&quot;&gt;Trace&lt;/code&gt;，或加上生产环境没有的 console target。&lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__154&quot;&gt;autoReload=&amp;quot;true&amp;quot;&lt;/code&gt; 也允许在任何环境运行时编辑 &lt;code style=&quot;padding: 0.15em 0.38em;border-radius: 4px;background: #eef2f7;color: #c0392b;font-family: &amp;quot;SFMono-Regular&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace;font-size: 0.89em;word-break: break-all;&quot; class=&quot;js_darkmode__155&quot;&gt;nlog.config&lt;/code&gt; 而无需重启。&lt;/p&gt;&lt;hr style=&quot;margin: 1.6em 0;border: 0;border-top: 1px solid #d9e0ea;&quot; class=&quot;js_darkmode__156&quot;/&gt;&lt;p style=&quot;margin: 0.7em 0;&quot;&gt;如果你也在搭建 .NET 应用的可观测性体系，欢迎关注 Aide Hub。我们会继续分享 ASP.NET Core、日志、监控和软件工程实践的一手教程。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 10 Aug 2026 14:18:19 +0800</pubDate></item><item><title>Think OpenAPI 一个 ThinkPHP 8 API 项目的轻量级生成器</title><link>https://www.codepub.top/post/654.html</link><description>&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Think OpenAPI 是一个面向 ThinkPHP 8 API 项目的轻量级 &lt;span class=&quot;&quot;&gt;OpenAPI 3.1&lt;/span&gt; 生成器和文档 UI 组件。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;它会读取 ThinkPHP 路由、&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;#[ApiDoc]&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;Attribute、&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;think\Validate&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;验证规则、响应 SchemaProvider 和路由中间件信息，生成标准 OpenAPI JSON 文档。同时内置 &lt;span class=&quot;&quot;&gt;Scalar&lt;/span&gt; 和 Stoplight Elements 文档页面。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;项目地址：&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span class=&quot;wx_text_underline&quot;&gt;https://github.com/c-v-c-v/think-openapi&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;功能特性&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;从 ThinkPHP 路由定义生成 OpenAPI 3.1 JSON。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;使用少量 PHP 8 Attribute 描述接口，避免编写大量 OpenAPI 注解。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;复用&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;think\Validate&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;规则生成查询参数和 JSON 请求体 schema。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;使用普通 PHP 类定义可复用响应 schema。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;支持单项、列表、分页、空响应和自定义响应数据结构。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;根据配置的中间件识别 Bearer 认证。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;内置 Scalar、Stoplight 和原始 JSON 文档路由。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;提供 lint 命令，检查重复路由、重复 operationId、失效&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;$ref&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;、无效响应 provider 和空请求 schema。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;环境要求&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;PHP 8.2 或更高版本&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;ThinkPHP 8&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;安装&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin: 10px 0px; padding: 0px; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 15px 16px 16px; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;composer require cvcv/think-openapi&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;本包通过 Composer metadata 自动注册 ThinkPHP 服务。默认配置位于包内的&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;config/openapi.php&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;，你可以在应用配置中覆盖这些选项。&lt;/span&gt;&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;快速开始&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;给需要出现在文档中的控制器方法添加&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;#[ApiDoc]&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。没有&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;#[ApiDoc]&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;的方法会被忽略。&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left; margin: 10px 0px; padding: 0px; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 15px 16px 16px; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 5px; display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;color: #61AEEE; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;color: #C678DD; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;namespace&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #61AEEE; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;app&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: #61AEEE; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;controller&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;app&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;validate&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;UserValidate&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;app&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;resource&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;UserResource&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Attribute&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ApiDoc&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Attribute&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ApiGroup&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;OpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ResponseDataType&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;think&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;response&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Json&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__13&quot;&gt;#[ApiGroup(tags: [&amp;#39;Users&amp;#39;])]&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;UserController&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__14&quot;&gt;#[ApiDoc(&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; summary:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;用户列表&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; validate: UserValidate::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scene:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;index&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response: UserResource::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; responseType: ResponseDataType::Page,&lt;br/&gt;&amp;nbsp; &amp;nbsp; )]&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Json&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;json();&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__15&quot;&gt;#[ApiDoc(&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; summary:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;创建用户&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tags: [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;Write&amp;#39;&lt;/span&gt;],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; validate: UserValidate::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scene:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;store&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response: UserResource::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; )]&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;save&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Json&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;json();&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__16&quot;&gt;#[ApiDoc(&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; summary:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;删除用户&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; )]&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;: \&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;think&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Response&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;response(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;204&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;照常定义路由：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;app&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;controller&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;UserController&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;think&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;facade&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Route&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;Route::get(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;users&amp;#39;&lt;/span&gt;, [UserController::class,&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;index&amp;#39;&lt;/span&gt;]);&lt;br/&gt;Route::post(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;users&amp;#39;&lt;/span&gt;, [UserController::class,&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;save&amp;#39;&lt;/span&gt;]);&lt;br/&gt;Route::delete(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;users/&amp;lt;id&amp;gt;&amp;#39;&lt;/span&gt;, [UserController::class,&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;delete&amp;#39;&lt;/span&gt;]);&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;生成 OpenAPI 文件：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__19&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__20&quot;&gt;php think docs:generate&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;访问文档页面：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;Scalar：&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__21&quot;&gt;/docs/api&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;Stoplight Elements：&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__22&quot;&gt;/docs/api/stoplight&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;OpenAPI JSON：&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__23&quot;&gt;/docs/api.json&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Operation 扩展字段&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;如果需要给单个 operation 添加 OpenAPI 扩展字段，可以使用&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__24&quot;&gt;ApiDoc::extensions&lt;/code&gt;。只会透传&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__25&quot;&gt;x-*&lt;/code&gt;&amp;nbsp;开头的字段；如果同名字段已经由认证解析器等内部逻辑生成，则不会被覆盖。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__28&quot;&gt;#[ApiDoc(&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; summary:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;用户列表&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; response: UserResource::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; extensions: [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;x-code-samples&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;lang&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;curl&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;source&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;curl /users&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;)]&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Json&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;json();&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;参数覆盖&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;如果 Validate 或路由参数推导不够精确，可以使用可重复的&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__29&quot;&gt;#[ApiParam]&lt;/code&gt;&amp;nbsp;覆盖已有参数，或追加 header、cookie 等参数。同名且&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__30&quot;&gt;in&lt;/code&gt;&amp;nbsp;相同的参数会合并；path 参数始终保持&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__31&quot;&gt;required: true&lt;/code&gt;，且只能覆盖路由模板中已经存在的 path 参数。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Attribute&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ApiParam&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__34&quot;&gt;#[ApiParam(&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; name:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;page[number]&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; in:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;query&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; description:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;页码&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; schema: [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;type&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;integer&amp;#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;minimum&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;1&lt;/span&gt;],&lt;br/&gt;&amp;nbsp; &amp;nbsp; example:&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;1&lt;/span&gt;,&lt;br/&gt;)]&lt;br/&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__35&quot;&gt;#[ApiParam(&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; name:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;X-Request-ID&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; in:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;header&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; description:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;请求 ID&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; schema: [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;type&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;string&amp;#39;&lt;/span&gt;],&lt;br/&gt;)]&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Json&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;json();&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;响应覆盖&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;如果需要补充错误响应或覆盖默认响应描述，可以使用可重复的&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__36&quot;&gt;#[ApiResponse]&lt;/code&gt;。同状态码响应会浅合并，不存在的状态码会追加；扩展字段只透传&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__37&quot;&gt;x-*&lt;/code&gt;。&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__38&quot;&gt;status&lt;/code&gt;&amp;nbsp;可以是 HTTP 状态码或&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__39&quot;&gt;default&lt;/code&gt;；响应会始终包含&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__40&quot;&gt;description&lt;/code&gt;，&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__41&quot;&gt;204&lt;/code&gt;&amp;nbsp;响应会忽略&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__42&quot;&gt;content&lt;/code&gt;。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Attribute&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ApiResponse&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__45&quot;&gt;#[ApiResponse(&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; status:&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;400&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; description:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;验证失败&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; content: [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;application/json&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;schema&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;type&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;object&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;properties&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;message&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;type&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;string&amp;#39;&lt;/span&gt;],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;)]&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;save&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Json&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;json();&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Validate 规则&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;当设置了&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__46&quot;&gt;ApiDoc::validate&lt;/code&gt;&amp;nbsp;时，生成器会读取验证器中的 protected&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__47&quot;&gt;$rule&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__48&quot;&gt;$field&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__49&quot;&gt;$scene&lt;/code&gt;&amp;nbsp;属性。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;对于&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__50&quot;&gt;GET&lt;/code&gt;&amp;nbsp;接口，验证规则会转换为 query 参数。点号字段会转换为方括号参数名，例如&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__51&quot;&gt;page.number&lt;/code&gt;&amp;nbsp;会变成&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__52&quot;&gt;page[number]&lt;/code&gt;。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;对于&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__53&quot;&gt;POST&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__54&quot;&gt;PUT&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__55&quot;&gt;PATCH&lt;/code&gt;&amp;nbsp;接口，验证规则会转换为请求体 schema。默认使用&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__56&quot;&gt;application/json&lt;/code&gt;；如果规则包含&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__57&quot;&gt;file&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__58&quot;&gt;image&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__59&quot;&gt;fileExt&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__60&quot;&gt;fileMime&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__61&quot;&gt;fileSize&lt;/code&gt;，会使用&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__62&quot;&gt;multipart/form-data&lt;/code&gt;。点号字段会转换为嵌套对象属性，&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__63&quot;&gt;*&lt;/code&gt;&amp;nbsp;通配符字段会转换为数组&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__64&quot;&gt;items&lt;/code&gt;。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__65&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__66&quot;&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;app&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;validate&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;app&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;enum&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;UserStatus&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;think&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Validate&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;UserValidate&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;extends&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;Validate&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;$rule = [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;filter.name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;string|max:255&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;page.number&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;integer|between:1,100000&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;profile.name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|string|max:255&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;profile.email&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|string|max:255&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|string|enum:&amp;#39;&lt;/span&gt;&amp;nbsp;. UserStatus::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;enabled&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;boolean&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|array|min:1&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags.*&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;string|max:20&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|array&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list.*&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;string|enum:&amp;#39;&lt;/span&gt;&amp;nbsp;. UserStatus::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|array&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.id&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|integer&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|string|max:32&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; ];&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;$field = [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;filter.name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;名称筛选&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;page.number&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;页码&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;profile.name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;用户名称&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;profile.email&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;邮箱地址&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;用户状态&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;enabled&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;是否启用&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;标签列表&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags.*&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;标签&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;状态列表&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list.*&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;状态项&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;成员列表&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.id&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;成员 ID&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;成员名称&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; ];&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;$scene = [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;index&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;filter.name&amp;#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;page.number&amp;#39;&lt;/span&gt;],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;store&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;profile.name&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;profile.email&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;enabled&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags.*&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list.*&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.id&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.name&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ];&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;当前支持的 schema 推导规则包括：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__67&quot;&gt;require&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__68&quot;&gt;required&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__69&quot;&gt;integer&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__70&quot;&gt;int&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__71&quot;&gt;type: integer&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__72&quot;&gt;number&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__73&quot;&gt;float&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__74&quot;&gt;type: number&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__75&quot;&gt;boolean&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__76&quot;&gt;bool&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__77&quot;&gt;type: boolean&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__78&quot;&gt;array&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__79&quot;&gt;type: array&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__80&quot;&gt;field.*&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__81&quot;&gt;field.items&lt;/code&gt;，用于标量数组，例如&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__82&quot;&gt;tags.*&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__83&quot;&gt;items.type: string&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__84&quot;&gt;field.*.name&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__85&quot;&gt;field.items.properties.name&lt;/code&gt;，用于对象数组，例如&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__86&quot;&gt;members.*.id&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__87&quot;&gt;email&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__88&quot;&gt;format: email&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__89&quot;&gt;url&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__90&quot;&gt;format: uri&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__91&quot;&gt;date&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__92&quot;&gt;format: date&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__93&quot;&gt;dateFormat:Y-m-d&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__94&quot;&gt;date_format:Y-m-d H:i:s&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__95&quot;&gt;format: date&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__96&quot;&gt;format: date-time&lt;/code&gt;，并保留&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__97&quot;&gt;x-thinkphp-rule&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__98&quot;&gt;ip&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__99&quot;&gt;ip:ipv4&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__100&quot;&gt;ip:ipv6&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__101&quot;&gt;format: ipv4&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__102&quot;&gt;format: ipv6&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;字符串上的&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__103&quot;&gt;max:n&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__104&quot;&gt;min:n&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__105&quot;&gt;length:n&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__106&quot;&gt;length:min,max&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__107&quot;&gt;maxLength&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__108&quot;&gt;minLength&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;数组上的&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__109&quot;&gt;max:n&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__110&quot;&gt;min:n&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__111&quot;&gt;length:n&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__112&quot;&gt;length:min,max&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__113&quot;&gt;maxItems&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__114&quot;&gt;minItems&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__115&quot;&gt;between:min,max&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__116&quot;&gt;minimum&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__117&quot;&gt;maximum&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__118&quot;&gt;egt:n&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__119&quot;&gt;&amp;gt;=:n&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__120&quot;&gt;gt:n&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__121&quot;&gt;&amp;gt;:n&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__122&quot;&gt;elt:n&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__123&quot;&gt;&amp;lt;=:n&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__124&quot;&gt;lt:n&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__125&quot;&gt;&amp;lt;:n&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__126&quot;&gt;multipleOf:n&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__127&quot;&gt;multipleOf&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__128&quot;&gt;in:a,b,c&lt;/code&gt;&amp;nbsp;-&amp;gt; 按字段类型生成内联 enum 值&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__129&quot;&gt;notIn:a,b,c&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__130&quot;&gt;not.enum&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__131&quot;&gt;file&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__132&quot;&gt;image&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__133&quot;&gt;fileExt&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__134&quot;&gt;fileMime&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__135&quot;&gt;fileSize&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__136&quot;&gt;multipart/form-data&lt;/code&gt;&amp;nbsp;文件字段，schema 为&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__137&quot;&gt;type: string&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__138&quot;&gt;format: binary&lt;/code&gt;，ThinkPHP 文件约束保留在&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__139&quot;&gt;x-thinkphp-rule&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__140&quot;&gt;regex:/.../&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__141&quot;&gt;pattern&lt;/code&gt;；带修饰符或无法安全转换时保留&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__142&quot;&gt;x-thinkphp-rule&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__143&quot;&gt;alpha&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__144&quot;&gt;alphaNum&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__145&quot;&gt;alphaDash&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__146&quot;&gt;chs&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__147&quot;&gt;chsAlpha&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__148&quot;&gt;chsAlphaNum&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__149&quot;&gt;chsDash&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__150&quot;&gt;mobile&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__151&quot;&gt;idCard&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__152&quot;&gt;zip&lt;/code&gt;&amp;nbsp;-&amp;gt; 基于 ThinkPHP 内置正则生成&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__153&quot;&gt;pattern&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__154&quot;&gt;[&amp;#39;max&amp;#39; =&amp;gt; 10]&lt;/code&gt;、&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__155&quot;&gt;[&amp;#39;in&amp;#39; =&amp;gt; [&amp;#39;a&amp;#39;, &amp;#39;b&amp;#39;]]&lt;/code&gt;&amp;nbsp;等关联数组规则会按 ThinkPHP 规则名归一化后推导&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;PHP enum 或&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__156&quot;&gt;enum:EnumClass&lt;/code&gt;&amp;nbsp;-&amp;gt; 可复用 enum 组件 schema；用于&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__157&quot;&gt;status_list.*&lt;/code&gt;&amp;nbsp;时会生成 enum 数组的&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__158&quot;&gt;items.$ref&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;数组规则示例：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__159&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__160&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;$rule = [&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;ids&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|array|min:1&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;ids.*&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;integer&amp;#39;&lt;/span&gt;,&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|array&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;tags.*&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;string|max:20&amp;#39;&lt;/span&gt;,&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|array&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;status_list.*&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;string|enum:&amp;#39;&lt;/span&gt;&amp;nbsp;. UserStatus::class,&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|array&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.id&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|integer&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;members.*.name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;require|string|max:32&amp;#39;&lt;/span&gt;,&lt;br/&gt;];&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;上面的规则会分别生成整数数组、字符串数组、枚举数组和对象数组。不要同时为同一个数组写直接 item 规则和 item 对象属性规则，例如同时写&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__161&quot;&gt;members.*&lt;/code&gt;&amp;nbsp;与&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__162&quot;&gt;members.*.id&lt;/code&gt;；&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__163&quot;&gt;docs:lint&lt;/code&gt;&amp;nbsp;会报告&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__164&quot;&gt;conflicting-array-item-schema&lt;/code&gt;。如果父字段已经声明为&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__165&quot;&gt;array&lt;/code&gt;，子字段应使用&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__166&quot;&gt;members.*.id&lt;/code&gt;&amp;nbsp;而不是&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__167&quot;&gt;members.id&lt;/code&gt;；如果父字段声明为&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__168&quot;&gt;string&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__169&quot;&gt;integer&lt;/code&gt;&amp;nbsp;等非数组类型，也不要再使用&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__170&quot;&gt;members.*&lt;/code&gt;，否则会报告&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__171&quot;&gt;conflicting-array-parent-schema&lt;/code&gt;。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;响应 &lt;span class=&quot;&quot;&gt;Schema&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;响应类必须实现&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__172&quot;&gt;SchemaProvider&lt;/code&gt;。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__173&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__174&quot;&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;app&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;resource&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;OpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ObjectSchema&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;OpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Schema&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;OpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;SchemaProvider&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;UserResource&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;implements&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;SchemaProvider&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;openApiSchemaName&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;string&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;User&amp;#39;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;openApiSchemas&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;array&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;ObjectSchema::make(&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;self&lt;/span&gt;::openApiSchemaName())&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;property(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;id&amp;#39;&lt;/span&gt;, Schema::integer(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;用户 ID&amp;#39;&lt;/span&gt;), required:&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;true&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;property(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;, Schema::string(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;用户名称&amp;#39;&lt;/span&gt;), required:&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;true&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;property(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;email&amp;#39;&lt;/span&gt;, Schema::format(Schema::string(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;邮箱地址&amp;#39;&lt;/span&gt;),&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;email&amp;#39;&lt;/span&gt;), required:&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;true&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;components();&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;常用 schema 元数据可以用 helper 叠加：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__175&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__176&quot;&gt;Schema::example(Schema::string(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;用户名称&amp;#39;&lt;/span&gt;),&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;Alice&amp;#39;&lt;/span&gt;);&lt;br/&gt;Schema::deprecated(Schema::string(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;旧字段&amp;#39;&lt;/span&gt;));&lt;br/&gt;Schema::with(Schema::string(), [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;x-displayName&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;状态&amp;#39;&lt;/span&gt;]);&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;标准字段使用专用 helper；&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__177&quot;&gt;Schema::with()&lt;/code&gt;&amp;nbsp;只透传 OpenAPI 扩展字段，也就是&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__178&quot;&gt;x-*&lt;/code&gt;。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;使用&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__179&quot;&gt;ResponseDataType&lt;/code&gt;&amp;nbsp;描述&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__180&quot;&gt;data&lt;/code&gt;&amp;nbsp;字段结构：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__181&quot;&gt;ResponseDataType::Item&lt;/code&gt;：单个对象&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__182&quot;&gt;ResponseDataType::List&lt;/code&gt;：对象数组&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__183&quot;&gt;ResponseDataType::Page&lt;/code&gt;：&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__184&quot;&gt;{ list, meta }&lt;/code&gt;&amp;nbsp;分页对象&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__185&quot;&gt;ResponseDataType::None&lt;/code&gt;：无响应数据&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;如果设置了&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__186&quot;&gt;response&lt;/code&gt;&amp;nbsp;但没有设置&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__187&quot;&gt;responseType&lt;/code&gt;，默认使用单项响应数据。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;默认响应会被包装为：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__188&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__189&quot;&gt;{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;&amp;quot;code&amp;quot;&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;200&lt;/span&gt;,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;: {},&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #d19a66;line-height: 26px;&quot;&gt;&amp;quot;msg&amp;quot;&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;quot;OK&amp;quot;&lt;/span&gt;&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;如果希望直接返回原始 data schema，可以配置：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__190&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__191&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;OpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Response&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;RawDataSchemaFactory&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;response_schema_factory&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; RawDataSchemaFactory::class,&lt;br/&gt;];&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;你也可以实现&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__192&quot;&gt;Cvcv\ThinkOpenApi\OpenApi\Response\ResponseSchemaFactory&lt;/code&gt;，定义自己的响应包装结构。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;认证&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;内置的 bearer inspector 可以在路由包含指定中间件时，将接口标记为需要认证。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__193&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__194&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;security&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;bearer&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;middleware&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; app\middleware\AuthToken::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;scheme_name&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;bearerAuth&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;description&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;Bearer Token 认证。&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;];&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;如果需要更复杂的中间件识别逻辑，可以实现&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__195&quot;&gt;MiddlewareSecurityInspector&lt;/code&gt;，并注册到&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__196&quot;&gt;openapi.security.inspectors&lt;/code&gt;。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__197&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__198&quot;&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;app&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;openapi&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;OpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Security&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;AuthState&lt;/span&gt;;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Cvcv&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;ThinkOpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;OpenApi&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;Security&lt;/span&gt;\&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;MiddlewareSecurityInspector&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;AdminSecurityInspector&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;implements&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;MiddlewareSecurityInspector&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;inspect&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;(string $middleware, array $parameters, AuthState $state)&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;void&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;($middleware !== \app\middleware\AdminAuth::class) {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $state-&amp;gt;requireSecurity([&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;adminBearer&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; []]);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $state-&amp;gt;addDescription(&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;需要管理员 Bearer Token。&amp;#39;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;securitySchemes&lt;/span&gt;&lt;span style=&quot;line-height: 26px;&quot;&gt;()&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #61aeee;line-height: 26px;&quot;&gt;array&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;adminBearer&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;type&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;http&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;scheme&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;bearer&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;bearerFormat&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;token&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;description&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;管理员 Bearer Token。&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ];&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__199&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__200&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;security&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;inspectors&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; \Cvcv\ThinkOpenApi\OpenApi\Security\BearerMiddlewareSecurityInspector::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; \app\openapi\AdminSecurityInspector::class,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;];&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;配置&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;默认配置：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__201&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__202&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;ThinkPHP OpenAPI&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;version&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;0.1.0&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;servers&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;/&amp;#39;&lt;/span&gt;],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;json_url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;/docs/api.json&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;spec_path&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;runtime/docs/openapi.json&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;production_envs&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;prod&amp;#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;production&amp;#39;&lt;/span&gt;],&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;regenerate_on_request&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;false&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;routes&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;enabled&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;true&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;scalar&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;docs/api&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;stoplight&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;docs/api/stoplight&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;json&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;docs/api.json&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;ui&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;scalar&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;script_url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;https://cdn.jsdelivr.net/npm/@scalar/api-reference&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;stoplight&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;script_url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;https://unpkg.com/@stoplight/elements/web-components.min.js&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;styles_url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;https://unpkg.com/@stoplight/elements/styles.min.css&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;];&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;当&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__203&quot;&gt;app.env&lt;/code&gt;&amp;nbsp;命中&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__204&quot;&gt;production_envs&lt;/code&gt;&amp;nbsp;时，文档路由会返回 404。生产环境建议主动生成并发布 JSON 文件，不建议在每次请求时重新生成。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;离线文档 UI&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;默认文档页面通过 &lt;span class=&quot;&quot;&gt;CDN&lt;/span&gt; 加载 Scalar 和 Stoplight Elements。内网或离线环境可以只覆盖资源 URL，不需要复制或改写内置模板：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__205&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__206&quot;&gt;&lt;span style=&quot;color: #c678dd;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;ui&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;scalar&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;script_url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;/assets/openapi/scalar.js&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;stoplight&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt; [&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;script_url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;/assets/openapi/stoplight-elements.js&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;styles_url&amp;#39;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #98c379;line-height: 26px;&quot;&gt;&amp;#39;/assets/openapi/stoplight-elements.css&amp;#39;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br/&gt;&amp;nbsp; &amp;nbsp; ],&lt;br/&gt;];&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;如果需要完全自定义 HTML，仍然可以通过&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__207&quot;&gt;views_path&lt;/code&gt;&amp;nbsp;指向自己的&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__208&quot;&gt;scalar.html&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__209&quot;&gt;stoplight.html&lt;/code&gt;。内置模板会对配置值进行 HTML 转义。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;命令&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;生成 OpenAPI 文档到配置的&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__210&quot;&gt;spec_path&lt;/code&gt;：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__211&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__212&quot;&gt;php think docs:generate&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;生成到自定义路径：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__213&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__214&quot;&gt;php think docs:generate --output=runtime/docs/openapi.json&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;检查生成文档和路由元数据：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__215&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__216&quot;&gt;php think docs:lint&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__217&quot;&gt;docs:lint&lt;/code&gt;&amp;nbsp;适合放入 CI；发现问题时会返回非零退出码。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;生成流程&lt;/span&gt;&lt;/h2&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;通过 route list provider 加载 ThinkPHP 路由。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;只处理指向已有控制器方法的路由 action。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;只生成带有&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__218&quot;&gt;#[ApiDoc]&lt;/code&gt;&amp;nbsp;的方法。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;将&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__219&quot;&gt;&amp;lt;id&amp;gt;&lt;/code&gt;&amp;nbsp;风格的 ThinkPHP 路由变量转换为&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__220&quot;&gt;{id}&lt;/code&gt;&amp;nbsp;OpenAPI path 参数。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;当&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__221&quot;&gt;ApiDoc&lt;/code&gt;&amp;nbsp;没有提供摘要和描述时，方法 PHPDoc 可作为后备来源。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;根据 Validate 规则生成请求参数或请求体 schema。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;将响应&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__222&quot;&gt;SchemaProvider&lt;/code&gt;&amp;nbsp;注册到&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__223&quot;&gt;components.schemas&lt;/code&gt;。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;通过 middleware security inspector 添加 operation&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__224&quot;&gt;security&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__225&quot;&gt;components.securitySchemes&lt;/code&gt;。&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;路由支持边界&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;生成器只处理可以解析到控制器方法的路由 action：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__226&quot;&gt;[Controller::class, &amp;#39;method&amp;#39;]&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__227&quot;&gt;Controller/method&lt;/code&gt;&amp;nbsp;字符串，其中&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__228&quot;&gt;Controller&lt;/code&gt;&amp;nbsp;是已存在的完整类名，或位于当前应用命名空间下的控制器类名&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;只有方法存在、HTTP 方法是&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__229&quot;&gt;GET&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__230&quot;&gt;POST&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__231&quot;&gt;PUT&lt;/code&gt;、&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__232&quot;&gt;PATCH&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__233&quot;&gt;DELETE&lt;/code&gt;，并且方法带有&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__234&quot;&gt;#[ApiDoc]&lt;/code&gt;&amp;nbsp;时，才会生成 OpenAPI operation。闭包路由、无法解析到类方法的路由、未加&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__235&quot;&gt;#[ApiDoc]&lt;/code&gt;&amp;nbsp;的方法，以及当前不支持的 HTTP 方法会被跳过。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__236&quot;&gt;docs:lint&lt;/code&gt;&amp;nbsp;会对可疑跳过项给出提示：带&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__237&quot;&gt;#[ApiDoc]&lt;/code&gt;&amp;nbsp;但使用不支持 HTTP 方法的路由会报告&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__238&quot;&gt;unsupported-route-method&lt;/code&gt;；看起来像控制器 action 但无法解析到现有方法的路由会报告&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__239&quot;&gt;unsupported-route-action&lt;/code&gt;。普通闭包路由不会被视为 lint 问题。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;开发&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;安装依赖：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__240&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__241&quot;&gt;composer install&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;运行测试：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__242&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__243&quot;&gt;composer&amp;nbsp;&lt;span style=&quot;color: #e6c07b;line-height: 26px;&quot;&gt;test&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;运行单个测试文件：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__244&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__245&quot;&gt;vendor/bin/phpunit -c phpunit.xml tests/Unit/OpenApi/GeneratorTest.php&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;感谢大家阅读，个人观点仅供参考，欢迎在评论区发表不同观点。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 05 Aug 2026 13:57:18 +0800</pubDate></item><item><title>一个基于 ThinkPHP 8.0 的现代化个人博客系统</title><link>https://www.codepub.top/post/653.html</link><description>&lt;h1 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 24px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;个人博客系统&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;基于&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;ThinkPHP 8.0&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;和&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;PHP 8.4&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;的现代化个人博客系统，采用 MVC 架构，支持静态页面生成、富文本编辑、完整的权限管理和安全防护。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;项目地址：&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;https://gitee.com/nick_qin/nick-blog&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;功能特性&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;后台管理&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;文章管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：文章的创建、编辑、发布、删除、草稿管理、回收站恢复&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;分类管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：文章分类的增删改查，支持文章数量统计&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;标签管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：标签的增删改查，支持标签云展示&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;链接管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：友情链接的增删改查，支持显示/隐藏状态&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;用户管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：后台用户的增删改查，支持超级管理员和普通作者角色&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;系统设置&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：网站基本信息、SEO配置、邮件配置等全局设置&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;页面管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：关于页面、版权声明页面的内容管理&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;静态页面重建&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：一键重建首页、文章列表、详情页等静态HTML&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;前台展示&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;响应式设计&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：完美适配 PC 和移动端设备&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;文章列表&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持按分类、标签筛选，分页展示&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;文章详情&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持代码高亮、图片展示、点赞功能&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;搜索功能&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持按关键词搜索文章&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;热门推荐&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：热门文章排行、相关文章推荐&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;标签云&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：动态标签云，按文章数量显示热度&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;友情链接&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：底部友情链接展示&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;安全防护&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__19&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;CSRF 防护&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：表单提交 CSRF 令牌验证，AJAX 请求自动携带令牌&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;XSS 过滤&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：后端白名单过滤（DOMDocument），前端输出转义处理&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;账号锁定&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：登录失败5次后锁定30分钟&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;权限控制&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：超级管理员与普通作者权限区分&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;密码安全&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：bcrypt 加密存储，防止重复加密&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;会话安全&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：登录成功后重新生成 Session ID，防止会话固定攻击&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__25&quot;&gt;安全响应头&lt;/strong&gt;：X-Frame-Options、X-XSS-Protection、X-Content-Type-Options、Referrer-Policy、Permissions-Policy&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__26&quot;&gt;Cookie 安全&lt;/strong&gt;：HttpOnly、Secure（生产环境）、SameSite=Strict（生产环境）&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;性能优化&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__27&quot;&gt;静态化引擎&lt;/strong&gt;：自动生成静态 HTML，提升 SEO 和访问速度&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__28&quot;&gt;图片处理&lt;/strong&gt;：自动压缩、水印添加&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__29&quot;&gt;缓存机制&lt;/strong&gt;：文件缓存与 Redis 缓存支持&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;开发特性&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__30&quot;&gt;RESTful API&lt;/strong&gt;：完整的 API 接口，支持文章统计、点赞、搜索等&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__31&quot;&gt;日志系统&lt;/strong&gt;：按日期和大小自动分割日志，分类存储&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__32&quot;&gt;邮件服务&lt;/strong&gt;：SMTP 邮件发送，支持异常告警&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;技术栈&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;section&gt;分类&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__34&quot;&gt;&lt;section&gt;技术&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__35&quot;&gt;&lt;section&gt;版本&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__36&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;section&gt;语言&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__38&quot;&gt;&lt;section&gt;PHP&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__39&quot;&gt;&lt;section&gt;8.4+&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__40&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__41&quot;&gt;&lt;section&gt;框架&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__42&quot;&gt;&lt;section&gt;ThinkPHP&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;section&gt;8.0&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__45&quot;&gt;&lt;section&gt;数据库&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__46&quot;&gt;&lt;section&gt;MySQL&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__47&quot;&gt;&lt;section&gt;5.7.25+&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__48&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__49&quot;&gt;&lt;section&gt;前端框架&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__50&quot;&gt;&lt;section&gt;LayUI&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__51&quot;&gt;&lt;section&gt;2.8.18&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__52&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__53&quot;&gt;&lt;section&gt;富文本编辑器&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__54&quot;&gt;&lt;section&gt;wangEditor&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__55&quot;&gt;&lt;section&gt;5.1.23&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__56&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__57&quot;&gt;&lt;section&gt;图标库&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__58&quot;&gt;&lt;section&gt;Font Awesome&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__59&quot;&gt;&lt;section&gt;6.x&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__60&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__61&quot;&gt;&lt;section&gt;测试框架&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__62&quot;&gt;&lt;section&gt;PHPUnit&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__63&quot;&gt;&lt;section&gt;10.x&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;环境要求&lt;/span&gt;&lt;/h2&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__64&quot;&gt;PHP 8.4+&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__65&quot;&gt;MySQL 5.7.25+&lt;/strong&gt;&amp;nbsp;(50M+ 可用空间)&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__66&quot;&gt;Apache 2.4+&lt;/strong&gt;&amp;nbsp;(支持&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__67&quot;&gt;.htaccess&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__68&quot;&gt;mod_rewrite&lt;/code&gt;)&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__69&quot;&gt;PHP 扩展&lt;/strong&gt;：PDO、GD、MBstring、fileinfo&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;目录结构&lt;/span&gt;&lt;/h2&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__70&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__71&quot;&gt;nick-blog/&lt;br/&gt;├── app/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__72&quot;&gt;# 应用目录&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── admin/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__73&quot;&gt;# 后台应用&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; ├── controller/ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__74&quot;&gt;# 后台控制器（Article、Category、Tag、User等）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; ├── middleware/ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__75&quot;&gt;# 后台中间件（Auth、Csrf）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; └── view/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__76&quot;&gt;# 后台视图模板&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── api/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__77&quot;&gt;# API 接口&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; └── controller/ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__78&quot;&gt;# API控制器（Article、Category、Search等）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── index/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__79&quot;&gt;# 前台应用&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; ├── controller/ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__80&quot;&gt;# 前台控制器（Index、Article、Search等）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; └── view/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__81&quot;&gt;# 前台视图模板&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── Base/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__82&quot;&gt;# 核心类库&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; ├── Enums/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__83&quot;&gt;# 枚举类（ArticleStatus、UserRole等）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; ├── Services/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__84&quot;&gt;# 服务类（HtmlService、MailService等）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; │ &amp;nbsp; └── Functions/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__85&quot;&gt;# 公共函数（CustomLog、helpers等）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── model/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__86&quot;&gt;# 数据模型（Article、User、Category等）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── exception/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__87&quot;&gt;# 异常处理器（Handler）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── Request.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__88&quot;&gt;# 自定义请求类&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── helper.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__89&quot;&gt;# 应用助手函数入口&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── middleware.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__90&quot;&gt;# 应用中间件配置&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; └── provider.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__91&quot;&gt;# 应用服务提供器配置&lt;/span&gt;&lt;br/&gt;├── config/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__92&quot;&gt;# 配置文件（app、database、cache、session等）&lt;/span&gt;&lt;br/&gt;├── route/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__93&quot;&gt;# 路由配置（route.php、app.php）&lt;/span&gt;&lt;br/&gt;├── public/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__94&quot;&gt;# Web 根目录&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── index.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__95&quot;&gt;# 应用入口文件&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── router.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__96&quot;&gt;# 路由入口文件&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── install.locked.php &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__97&quot;&gt;# 安装程序（已锁定）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; ├── .htaccess &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__98&quot;&gt;# Apache 重写规则&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; └── static/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__99&quot;&gt;# 静态资源&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── admin/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__100&quot;&gt;# 后台静态资源（css、js）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── index/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__101&quot;&gt;# 前台静态资源（css、js、fontawesome）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── sysimg/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__102&quot;&gt;# 系统图片（logo、默认封面）&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; &amp;nbsp; &amp;nbsp; └── vendor/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__103&quot;&gt;# 第三方库（jQuery、LayUI、wangEditor）&lt;/span&gt;&lt;br/&gt;├── runtime/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__104&quot;&gt;# 运行时目录（缓存、日志）&lt;/span&gt;&lt;br/&gt;├── logs/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__105&quot;&gt;# 日志目录（按应用分类）&lt;/span&gt;&lt;br/&gt;├── doc/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__106&quot;&gt;# 项目文档（需求文档、日志管理文档）&lt;/span&gt;&lt;br/&gt;├── database.sql &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__107&quot;&gt;# 数据库建表 SQL&lt;/span&gt;&lt;br/&gt;├── composer.json &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__108&quot;&gt;# Composer 依赖配置&lt;/span&gt;&lt;br/&gt;├── composer.lock &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__109&quot;&gt;# Composer 依赖锁定&lt;/span&gt;&lt;br/&gt;├── think &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__110&quot;&gt;# ThinkPHP 命令行工具&lt;/span&gt;&lt;br/&gt;├── .env &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__111&quot;&gt;# 环境变量配置&lt;/span&gt;&lt;br/&gt;├── .gitignore &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__112&quot;&gt;# Git 忽略规则&lt;/span&gt;&lt;br/&gt;└── README.md &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__113&quot;&gt;# 项目说明文档&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;安装步骤&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;1. 上传文件&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;将所有文件上传到服务器的网站根目录。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2. 安装依赖&lt;/span&gt;&lt;/h3&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__114&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__115&quot;&gt;composer install&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3. 设置目录权限&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;以下目录需要可写权限 (755 或 775)：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__116&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__117&quot;&gt;chmod -R 755 runtime/&lt;br/&gt;chmod -R 755 public/&lt;br/&gt;chmod -R 755 logs/&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;4. 配置环境变量&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;复制&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__118&quot;&gt;.env.example&lt;/code&gt;&amp;nbsp;为&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__119&quot;&gt;.env&lt;/code&gt;（如果存在），或直接修改&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__120&quot;&gt;.env&lt;/code&gt;&amp;nbsp;文件。&lt;/p&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;开发环境配置&lt;/span&gt;&lt;/h4&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__121&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__122&quot;&gt;APP_ENV = development&lt;br/&gt;APP_DEBUG = true&lt;br/&gt;APP_TRACE = false&lt;br/&gt;&lt;br/&gt;[DATABASE]&lt;br/&gt;TYPE = mysql&lt;br/&gt;HOSTNAME = 127.0.0.1&lt;br/&gt;DATABASE = nick_blog&lt;br/&gt;USERNAME = root&lt;br/&gt;PASSWORD =&amp;nbsp;&lt;br/&gt;HOSTPORT = 3306&lt;br/&gt;CHARSET = utf8mb4&lt;br/&gt;PREFIX = bk_&lt;br/&gt;&lt;br/&gt;[LANG]&lt;br/&gt;default_lang = zh-cn&lt;br/&gt;&lt;br/&gt;[ADMIN]&lt;br/&gt;ADMIN_ROUTE_PREFIX = sysman&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;生产环境配置&lt;/span&gt;&lt;/h4&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__123&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__124&quot;&gt;APP_ENV = production&lt;br/&gt;APP_DEBUG = false&lt;br/&gt;APP_TRACE = false&lt;br/&gt;&lt;br/&gt;[DATABASE]&lt;br/&gt;TYPE = mysql&lt;br/&gt;HOSTNAME = 127.0.0.1&lt;br/&gt;DATABASE = your_database&lt;br/&gt;USERNAME = your_username&lt;br/&gt;PASSWORD = your_secure_password&lt;br/&gt;HOSTPORT = 3306&lt;br/&gt;CHARSET = utf8mb4&lt;br/&gt;PREFIX = bk_&lt;br/&gt;&lt;br/&gt;[LANG]&lt;br/&gt;default_lang = zh-cn&lt;br/&gt;&lt;br/&gt;[ADMIN]&lt;br/&gt;ADMIN_ROUTE_PREFIX = sysman&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;环境变量说明&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__125&quot;&gt;&lt;section&gt;变量&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__126&quot;&gt;&lt;section&gt;开发环境&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__127&quot;&gt;&lt;section&gt;生产环境&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__128&quot;&gt;&lt;section&gt;说明&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__129&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__130&quot;&gt;&lt;section&gt;APP_ENV&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__131&quot;&gt;&lt;section&gt;development&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__132&quot;&gt;&lt;section&gt;production&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__133&quot;&gt;&lt;section&gt;环境标识，决定安全配置&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__134&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__135&quot;&gt;&lt;section&gt;APP_DEBUG&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__136&quot;&gt;&lt;section&gt;true&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__137&quot;&gt;&lt;section&gt;false&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__138&quot;&gt;&lt;section&gt;调试模式，生产环境必须关闭&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__139&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__140&quot;&gt;&lt;section&gt;APP_TRACE&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__141&quot;&gt;&lt;section&gt;false&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__142&quot;&gt;&lt;section&gt;false&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__143&quot;&gt;&lt;section&gt;追踪模式，生产环境必须关闭&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;/p&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;生产环境自动生效的安全配置&lt;/span&gt;&lt;/h4&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;当&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__144&quot;&gt;APP_ENV = production&lt;/code&gt;&amp;nbsp;时，系统自动启用以下安全配置：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__145&quot;&gt;调试模式&lt;/strong&gt;：关闭（&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__146&quot;&gt;APP_DEBUG = false&lt;/code&gt;）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__147&quot;&gt;错误显示&lt;/strong&gt;：隐藏详细错误信息（&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__148&quot;&gt;show_error_msg = false&lt;/code&gt;）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__149&quot;&gt;Session Cookie&lt;/strong&gt;：仅 HTTPS 传输（&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__150&quot;&gt;secure = true&lt;/code&gt;）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__151&quot;&gt;普通 Cookie&lt;/strong&gt;：仅 HTTPS 传输（&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__152&quot;&gt;secure = true&lt;/code&gt;）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__153&quot;&gt;Cookie SameSite&lt;/strong&gt;：Strict 模式（更强的 CSRF 防护）&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;5. 导入数据库&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;执行&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__154&quot;&gt;database.sql&lt;/code&gt;&amp;nbsp;文件导入数据库表结构：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__155&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__156&quot;&gt;mysql -u your_username -p your_database &amp;lt; database.sql&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;6. 配置 Web 服务器&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;确保 Apache 或 Nginx 正确配置，指向&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__157&quot;&gt;public/&lt;/code&gt;&amp;nbsp;目录。&lt;/p&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Apache 配置&lt;/span&gt;&lt;/h4&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;确保启用&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__158&quot;&gt;mod_rewrite&lt;/code&gt;，并配置&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__159&quot;&gt;.htaccess&lt;/code&gt;&amp;nbsp;文件。&lt;/p&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Nginx 配置&lt;/span&gt;&lt;/h4&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__160&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__161&quot;&gt;server {&lt;br/&gt;&amp;nbsp; &amp;nbsp; listen 80;&lt;br/&gt;&amp;nbsp; &amp;nbsp; server_name yourdomain.com;&lt;br/&gt;&amp;nbsp; &amp;nbsp; root /path/to/public;&lt;br/&gt;&amp;nbsp; &amp;nbsp; index index.php;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; location / {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!-e $request_filename) {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rewrite ^(.*)$ /index.php/$1 last;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; location ~ \.php$ {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_pass 127.0.0.1:9000;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_index index.php;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; include fastcgi_params;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;7. 访问后台&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;访问后台地址：&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__162&quot;&gt;http://yourdomain.com/sysman/login&lt;/code&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;默认账号（安装时设置）：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;用户名：&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__163&quot;&gt;admin&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;密码：&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__164&quot;&gt;admin123&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__165&quot;&gt;注意&lt;/strong&gt;：后台路由前缀由&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__166&quot;&gt;.env&lt;/code&gt;&amp;nbsp;文件中的&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__167&quot;&gt;ADMIN.ADMIN_ROUTE_PREFIX&lt;/code&gt;&amp;nbsp;配置，默认为&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__168&quot;&gt;sysman&lt;/code&gt;。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;目录访问权限说明&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__169&quot;&gt;&lt;section&gt;目录/文件&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__170&quot;&gt;&lt;section&gt;用途&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__171&quot;&gt;&lt;section&gt;访问权限&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__172&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__173&quot;&gt;&lt;section&gt;runtime/&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__174&quot;&gt;&lt;section&gt;运行时文件、缓存&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__175&quot;&gt;&lt;section&gt;禁止外部访问&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__176&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__177&quot;&gt;&lt;section&gt;config/&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__178&quot;&gt;&lt;section&gt;配置文件&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__179&quot;&gt;&lt;section&gt;禁止外部访问&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__180&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__181&quot;&gt;&lt;section&gt;logs/&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__182&quot;&gt;&lt;section&gt;日志文件&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__183&quot;&gt;&lt;section&gt;禁止外部访问&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__184&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__185&quot;&gt;&lt;section&gt;database.sql&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__186&quot;&gt;&lt;section&gt;数据库 SQL&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__187&quot;&gt;&lt;section&gt;禁止下载&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__188&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__189&quot;&gt;&lt;section&gt;.env&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__190&quot;&gt;&lt;section&gt;环境变量&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__191&quot;&gt;&lt;section&gt;禁止访问&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__192&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__193&quot;&gt;&lt;section&gt;public/upload/&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__194&quot;&gt;&lt;section&gt;上传文件&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__195&quot;&gt;&lt;section&gt;可访问&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__196&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__197&quot;&gt;&lt;section&gt;public/static/&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__198&quot;&gt;&lt;section&gt;静态资源&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__199&quot;&gt;&lt;section&gt;可访问&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(99, 87, 83);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__200&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__201&quot;&gt;&lt;section&gt;public/index.php&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__202&quot;&gt;&lt;section&gt;入口文件&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__203&quot;&gt;&lt;section&gt;可访问&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;命令行工具&lt;/span&gt;&lt;/h2&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__204&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__205&quot;&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__206&quot;&gt;# 清除缓存&lt;/span&gt;&lt;br/&gt;php think clear&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__207&quot;&gt;# 生成静态页面&lt;/span&gt;&lt;br/&gt;php think html:build&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__208&quot;&gt;# 查看路由列表&lt;/span&gt;&lt;br/&gt;php think route:list&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__209&quot;&gt;# 运行单元测试&lt;/span&gt;&lt;br/&gt;php vendor/bin/phpunit&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;API 接口&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;文章相关&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__210&quot;&gt;GET /api/article/recommend/:id&lt;/code&gt;&amp;nbsp;- 获取推荐文章&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__211&quot;&gt;POST /api/article/like&lt;/code&gt;&amp;nbsp;- 文章点赞&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__212&quot;&gt;GET /api/article/statistics&lt;/code&gt;&amp;nbsp;- 获取文章统计数据&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;搜索&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__213&quot;&gt;GET /api/search&lt;/code&gt;&amp;nbsp;- 文章搜索&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;分类与标签&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__214&quot;&gt;GET /api/category/all&lt;/code&gt;&amp;nbsp;- 获取所有分类&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__215&quot;&gt;GET /api/tag/all&lt;/code&gt;&amp;nbsp;- 获取所有标签&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;安全建议&lt;/span&gt;&lt;/h2&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__216&quot;&gt;安装后处理&lt;/strong&gt;：删除或重命名&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__217&quot;&gt;public/install.locked.php&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__218&quot;&gt;密码管理&lt;/strong&gt;：定期修改后台密码，使用强密码&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__219&quot;&gt;权限设置&lt;/strong&gt;：最小化数据库用户权限&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__220&quot;&gt;日志监控&lt;/strong&gt;：定期检查日志文件，发现异常及时处理&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__221&quot;&gt;备份数据&lt;/strong&gt;：定期备份数据库和重要文件&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;常见问题&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;1. 安装页面打不开&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;检查&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__222&quot;&gt;public/&lt;/code&gt;&amp;nbsp;目录是否有&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__223&quot;&gt;.htaccess&lt;/code&gt;&amp;nbsp;文件，确保 Apache 开启了&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__224&quot;&gt;mod_rewrite&lt;/code&gt;。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2. 静态页面不更新&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;手动重建：在后台&amp;quot;系统设置&amp;quot;页面保存设置，或访问&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__225&quot;&gt;/admin/html/rebuild&lt;/code&gt;&amp;nbsp;接口。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3. 图片上传失败&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;检查&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__226&quot;&gt;public/static/&lt;/code&gt;&amp;nbsp;目录是否有写权限，确认 PHP&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__227&quot;&gt;upload_max_filesize&lt;/code&gt;&amp;nbsp;设置。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;4. 邮件发送失败&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;检查&amp;quot;系统设置&amp;quot;中的 SMTP 配置是否正确，确保服务器支持邮件发送。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;5. 页面显示异常&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;清除缓存：运行&amp;nbsp;&lt;code style=&quot;color: rgb(99, 87, 83);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__228&quot;&gt;php think clear&lt;/code&gt;&amp;nbsp;命令清除运行时缓存。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;开发说明&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;代码规范&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;严格类型声明：使用&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__229&quot;&gt;declare(strict_types=1)&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;注释规范：类、方法、关键代码均需添加详细注释&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;异常处理：统一使用异常处理器处理应用异常&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;扩展开发&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;新控制器继承对应基类（&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__230&quot;&gt;BaseAdmin&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__231&quot;&gt;BaseController&lt;/code&gt;）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;使用服务类处理复杂业务逻辑&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;配置文件修改后需清除缓存&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;更新记录&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2026-07-09 - 安全漏洞修复与上线配置&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__232&quot;&gt;安全修复&lt;/strong&gt;：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;修复后台表格 templet 函数 XSS 漏洞（文章列表、用户列表、分类列表、标签列表、链接列表）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;增强后端 XSS 过滤函数，使用 DOMDocument 白名单过滤危险标签和属性&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;修复用户模型密码重复加密问题&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;添加登录成功后重新生成 Session ID（防止会话固定攻击）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;增强 CSRF 防护，全局 AJAX 请求自动携带 CSRF 令牌&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;添加安全 HTTP 响应头中间件（X-Frame-Options、X-XSS-Protection、X-Content-Type-Options、Referrer-Policy、Permissions-Policy）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;清理页面注释中的敏感信息&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__233&quot;&gt;配置优化&lt;/strong&gt;：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;数据库配置支持环境变量（&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__234&quot;&gt;.env&lt;/code&gt;&amp;nbsp;文件分组格式）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;Session 和 Cookie 安全配置根据环境自动切换&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;生产环境自动开启 Secure Cookie 和 SameSite=Strict&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;更新&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__235&quot;&gt;.env.example&lt;/code&gt;&amp;nbsp;模板文件&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__236&quot;&gt;404 页面功能&lt;/strong&gt;：&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;添加 3 秒倒计时自动返回首页功能&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;同时支持手动点击&amp;quot;返回首页&amp;quot;按钮&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2026-07-01 - 项目初始化&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;项目创建，基于 ThinkPHP 8.0 + PHP 8.4&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;实现文章管理、分类管理、标签管理、链接管理、用户管理等核心功能&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;实现静态页面生成、富文本编辑、搜索功能&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;实现基本的 CSRF 防护和账号锁定机制&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;感谢大家阅读，个人观点仅供参考，欢迎在评论区发表不同观点。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 05 Aug 2026 13:54:45 +0800</pubDate></item><item><title>为什么你的 ASP.NET Core 接口越来越慢？7 个隐藏性能杀手揭秘</title><link>https://www.codepub.top/post/652.html</link><description>&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-color: rgb(0, 0, 0); border-radius: 0px; box-shadow: none; display: block; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; padding: 0px; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;font-size: 18px; color: #0E8AEB; line-height: 1.8em; letter-spacing: 0em; padding: 0px 0px 0px 10px; border-style: none none none solid; border-width: 1px 1px 1px 5px; border-color: #000000 #000000 #000000 #0E88EB; border-radius: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; box-shadow: none; display: block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin: 0px; overflow: unset; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;1. 理解 API 延迟的构成&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;API 延迟（API Latency）简单来说，就是&lt;/span&gt;&lt;strong style=&quot;color: rgb(14, 136, 235); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;用户发起请求，到收到服务器返回结果之间所消耗的时间&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;很多开发者在优化接口性能时，第一反应往往是“优化代码”，但实际上，一个 API 请求经历的环节非常多，任何一个环节出现瓶颈，都可能导致接口响应变慢。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;一个完整的请求链路通常如下：&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 10px 0px; padding: 0px; visibility: visible;&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 16px; background: rgb(30, 30, 30); color: rgb(220, 220, 220); display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;客户端&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;网络传输&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;网关 / 负载均衡&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;ASP.NET Core Web Server（Kestrel/IIS）&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Middleware 中间件&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Controller / Minimal API&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;业务逻辑&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;数据库 / Redis / 外部服务&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp; →&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;返回响应&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;因此，API 延迟通常可以拆分为几个主要部分。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 18px; color: #0E88EB; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;1. 网络延迟&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__9&quot;&gt;网络延迟主要来自：用户距离服务器较远、网络链路质量较差、DNS 查询耗时、&lt;span class=&quot;&quot;&gt;TLS&lt;/span&gt; 握手耗时、网络拥塞等。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__10&quot;&gt;例如，用户在美国访问部署在亚洲的数据中心 API，由于物理距离和网络链路影响，即使服务器处理速度很快，也可能存在较高延迟。对于静态资源（图片、CSS、JavaScript 文件等），可以通过 &lt;span class=&quot;&quot;&gt;CDN&lt;/span&gt; 将内容缓存到距离用户更近的节点。但对于动态 API 接口，CDN 的作用相对有限，更常见的优化方式包括就近部署服务器、使用云厂商全球加速服务、优化网络链路，以及使用 HTTP/2、HTTP/3 减少通信开销。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2. 服务端处理延迟&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__11&quot;&gt;服务端处理延迟主要来自：复杂业务计算、同步阻塞操作、大量对象创建、序列化耗时和第三方接口调用。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__12&quot;&gt;例如，&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__13&quot;&gt;var result = httpClient.GetStringAsync(url).Result;&lt;/code&gt;&amp;nbsp;这种同步等待异步任务的写法，会阻塞线程。在高并发情况下，大量线程被占用，最终可能导致请求排队、线程池耗尽、API 响应时间持续增加。更推荐使用&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__14&quot;&gt;var result = await httpClient.GetStringAsync(url);&lt;/code&gt;。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__15&quot;&gt;需要注意的是，&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__16&quot;&gt;async/await&lt;/code&gt;&amp;nbsp;并不会让一次数据库查询或者 HTTP 请求变快。例如，数据库查询执行时间 500ms，改成异步后执行时间仍然是约 500ms。它真正带来的收益是：当线程等待 I/O 操作时，可以释放线程资源，让服务器处理更多请求。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3. 数据库访问延迟&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__17&quot;&gt;数据库往往是 API 性能瓶颈最常见的位置。常见问题包括：SQL 查询没有索引、返回大量无用字段、N+1 查询、连接池配置不合理、数据库锁竞争等。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__18&quot;&gt;例如，错误方式&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__19&quot;&gt;var users = await db.Users.ToListAsync();&lt;/code&gt;&amp;nbsp;如果用户表有几十万数据，这个查询会查询大量数据、占用数据库资源、增加网络传输。优化后只查询需要的数据，可以明显降低数据库压力：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;users =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;db.Users&lt;br/&gt;&amp;nbsp; &amp;nbsp; .Where(x =&amp;gt; x.IsActive)&lt;br/&gt;&amp;nbsp; &amp;nbsp; .Select(x =&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;{ x.Id, x.Name })&lt;br/&gt;&amp;nbsp; &amp;nbsp; .ToListAsync();&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__21&quot;&gt;对于 EF Core 查询，只读场景建议使用&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__22&quot;&gt;.AsNoTracking()&lt;/code&gt;&amp;nbsp;减少实体跟踪开销。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E8AEB;line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #0E88EB;border-right-color: #000000;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__24&quot;&gt;2. 测量 API 延迟的有效手段&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__25&quot;&gt;优化 API 性能之前，首先需要回答一个问题：&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__26&quot;&gt;到底慢在哪里？&lt;/strong&gt;&amp;nbsp;没有数据支撑的优化，很容易变成“凭感觉调参数”。因此，性能优化第一步永远是：&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__27&quot;&gt;测量 → 分析 → 优化 → 验证&lt;/strong&gt;。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;使用 Stopwatch 进行局部性能分析&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__28&quot;&gt;对于代码级性能分析，可以使用 .NET 自带的&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__29&quot;&gt;Stopwatch&lt;/code&gt;：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;stopwatch = Stopwatch.StartNew();&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;service.ProcessAsync();&lt;br/&gt;stopwatch.Stop();&lt;br/&gt;Console.WriteLine(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;$&amp;quot;执行耗时:&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;{stopwatch.ElapsedMilliseconds}&lt;/span&gt;ms&amp;quot;&lt;/span&gt;);&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__31&quot;&gt;适合定位某个方法耗时、某段业务逻辑耗时或 SQL 调用耗时，但它只能分析局部代码，生产环境通常需要更完整的监控。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;使用 &lt;span class=&quot;&quot;&gt;Middleware&lt;/span&gt; 统计 API 请求耗时&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__32&quot;&gt;ASP.NET Core 的请求都会经过 Middleware 管道，因此可以增加一个统一耗时统计中间件：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;LatencyMiddleware&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;readonly&lt;/span&gt;&amp;nbsp;RequestDelegate _next;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;readonly&lt;/span&gt;&amp;nbsp;ILogger&amp;lt;LatencyMiddleware&amp;gt; _logger;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;LatencyMiddleware&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;RequestDelegate next, ILogger&amp;lt;LatencyMiddleware&amp;gt; logger&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _next = next;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _logger = logger;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;Task&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;InvokeAsync&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;HttpContext context&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;stopwatch = Stopwatch.StartNew();&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;_next(context);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stopwatch.Stop();&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _logger.LogInformation(&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;Request {Path} completed in {Elapsed} ms&amp;quot;&lt;/span&gt;,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.Request.Path,&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stopwatch.ElapsedMilliseconds);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__34&quot;&gt;相比&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__35&quot;&gt;Console.WriteLine()&lt;/code&gt;，日志系统更加适合生产环境，因为它支持结构化日志、TraceId 关联、日志检索和分布式分析。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;生产环境监控工具&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__36&quot;&gt;在真实项目中，通常会组合多个工具：&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__38&quot;&gt;Application Insights&lt;/strong&gt;：适合 Azure 环境，可以监控请求耗时、异常、SQL 调用和依赖服务。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__39&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__40&quot;&gt;&lt;span class=&quot;&quot;&gt;OpenTelemetry&lt;/span&gt;&lt;/strong&gt;：目前云原生应用更推荐，可以统一采集 Trace、Metrics 和 Logs，结合 Jaeger、Grafana Tempo、Prometheus 形成完整链路追踪。例如，一次接口慢可以通过链路追踪快速定位真正瓶颈。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__41&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E8AEB;line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #0E88EB;border-right-color: #000000;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__42&quot;&gt;3. C# .NET 中的请求流转与瓶颈分析&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__43&quot;&gt;在 ASP.NET Core 中，一个 HTTP 请求大致经过以下流程：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__44&quot;&gt;Client → Kestrel / IIS → Middleware Pipeline → Routing → Controller / Minimal API → Service Layer → Database / External API → Response&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__45&quot;&gt;每一个环节都有可能成为性能瓶颈。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;1）避免同步阻塞&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__46&quot;&gt;例如&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__47&quot;&gt;var data = service.GetDataAsync().Result;&lt;/code&gt;&amp;nbsp;虽然代码可以运行，但是会阻塞线程、降低吞吐量、增加死锁风险。应该使用&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__48&quot;&gt;var data = await service.GetDataAsync();&lt;/code&gt;。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2）优化数据库访问&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__49&quot;&gt;常见优化包括添加合理索引和 EF Core 使用&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__50&quot;&gt;AsNoTracking()&lt;/code&gt;。例如查询&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__51&quot;&gt;select * from Orders where UserId = 100&lt;/code&gt;&amp;nbsp;应该建立&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__52&quot;&gt;CREATE INDEX IX_Order_UserId ON Orders(UserId);&lt;/code&gt;。对于查询列表、报表、展示页面等场景，可以使用&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__53&quot;&gt;await db.Products.AsNoTracking().ToListAsync();&lt;/code&gt;。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3）减少 Middleware 开销&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__54&quot;&gt;不要在每个请求中执行大量日志格式化、重复权限查询或不必要的数据转换。例如，错误的方式是请求 → 读取数据库权限 → 验证 Token → 查询用户信息 → 执行业务；优化后是请求 → JWT 验证 → 缓存用户信息 → 业务处理。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;4）优化 JSON 序列化&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__55&quot;&gt;ASP.NET Core 默认使用&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__56&quot;&gt;System.Text.Json&lt;/code&gt;，相比 Newtonsoft.Json 优势在于基于 Span、分配更少、性能更高。同时应该避免返回包含大量无用字段的数据，通过 DTO 投影、分页、删除无用字段来优化。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__57&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E8AEB;line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #0E88EB;border-right-color: #000000;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__58&quot;&gt;4. 优化 API 延迟的核心最佳实践&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__59&quot;&gt;在实际生产环境中，降低 API 延迟并不是依赖某一个技术，而是需要从代码、数据库、缓存、网络等多个层面综合优化。下面总结几个最常见、也是最有效的优化策略。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;1）合理使用 async/await，提高系统吞吐量&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__60&quot;&gt;对于数据库访问、HTTP 调用、文件读写、消息队列操作等 I/O 操作，应该优先采用异步 API。异步方式不会让数据库查询本身更快，但是可以避免线程长时间等待，提高服务器处理并发请求的能力。尤其是在 ASP.NET Core 中，请求量较大时，同步阻塞可能导致 ThreadPool 线程耗尽、请求排队、延迟不断升高。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2）合理使用缓存减少重复计算&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__61&quot;&gt;缓存是降低 API 延迟最有效的手段之一。如果商品信息短时间内变化不大，每次访问数据库就是浪费。可以改为第一次请求从数据库查询并存入 Redis 缓存，后续请求直接从 Redis 快速返回。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__62&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__63&quot;&gt;ASP.NET Core 内存缓存示例&lt;/strong&gt;：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__64&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;Task&amp;lt;User?&amp;gt; GetUserByIdAsync(&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;int&lt;/span&gt;&amp;nbsp;userId)&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(!_memoryCache.TryGetValue(userId,&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;out&lt;/span&gt;&amp;nbsp;User? user))&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;_databaseService.GetUserByIdAsync(userId);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(user !=&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;null&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _memoryCache.Set(userId, user, TimeSpan.FromMinutes(&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;10&lt;/span&gt;));&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;user;&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__65&quot;&gt;适合单体应用、单服务器部署、热点配置数据。如果是 Kubernetes、多实例部署、微服务架构，建议使用 Redis 分布式缓存。需要注意，不是所有数据都适合缓存，库存、余额、支付状态等强一致业务需要更加谨慎设计。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3）启用响应压缩减少网络传输&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__66&quot;&gt;当 API 返回大量 JSON 数据时，网络传输可能成为瓶颈。ASP.NET Core 支持 Gzip 和 Brotli 压缩。例如原始响应 1MB JSON，压缩后 200KB，可以明显减少网络传输时间和带宽消耗。配置方式为&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__67&quot;&gt;builder.Services.AddResponseCompression();&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__68&quot;&gt;app.UseResponseCompression();&lt;/code&gt;。需要注意，对于已经压缩的数据（JPG、PNG、ZIP），再次压缩收益很低。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__69&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E8AEB;line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #0E88EB;border-right-color: #000000;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__70&quot;&gt;5. 应对高并发的高级优化技术&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__71&quot;&gt;当系统访问量持续增长，仅优化代码已经无法满足需求，需要从架构层面解决问题。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;1）使用消息队列削峰填谷&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__72&quot;&gt;很多业务并不需要立即完成。例如用户下单，传统方式同步执行创建订单、扣库存、发送短信、生成积分等步骤，响应时间可能达到数秒。优化后用户请求只创建订单并发送消息，立即返回，后台消费者异步处理后续任务：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__73&quot;&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;async&lt;/span&gt;&amp;nbsp;Task&amp;lt;IActionResult&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;CreateOrder&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Order order&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;_messageQueue.SendAsync(order);&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;Accepted();&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__74&quot;&gt;返回 HTTP 202 Accepted 表示请求已经接收，后台处理中。适合订单处理、邮件发送、文件处理、数据同步等场景。常见消息队列有 RabbitMQ、Kafka、Azure Service Bus。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2）使用 Redis 分布式缓存&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__75&quot;&gt;单机缓存 MemoryCache 在多实例部署时无法共享。Redis 可以让多个 API 实例共享热点数据，适合用户 Session、热点数据、分布式锁和限流计数。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3）数据库水平扩展&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__76&quot;&gt;当单个数据库达到瓶颈时，可以考虑读写分离（写请求到主数据库，读请求到从数据库）或分库分表。但数据库分片不是第一优化选择，很多系统性能问题其实来自 SQL 设计错误、缺少索引、数据模型问题，应该先优化 SQL，再考虑分片。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;4）使用 HTTP/2 和 HTTP/3&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__77&quot;&gt;HTTP/1.1 多个请求可能需要多个连接；HTTP/2 支持多路复用和 Header 压缩；HTTP/3 基于 QUIC，提供更快连接建立和更好的弱网表现。对于大量 API 请求场景，可以降低网络通信开销。但如果瓶颈在 SQL 查询、CPU 计算或第三方接口，升级 HTTP 协议不会带来明显提升。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__78&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E8AEB;line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #0E88EB;border-right-color: #000000;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__79&quot;&gt;6. 实战案例：电商结账 API 的性能优化&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__80&quot;&gt;下面看一个真实生产环境中常见的问题。某电商平台的结账接口&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__81&quot;&gt;POST /api/order/checkout&lt;/code&gt;&amp;nbsp;初始平均响应时间 2~3 秒，用户体验明显下降。通过 Application Insights、SQL Profiler 和分布式链路追踪，发现主要问题：&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__82&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__83&quot;&gt;问题 1：同步调用库存服务&lt;/strong&gt;。原流程中订单 API 同步等待库存服务响应，库存服务响应慢时整个接口被拖慢。优化后改为异步调用、增加超时控制和重试策略。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__84&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__85&quot;&gt;问题 2：订单查询缺少索引&lt;/strong&gt;。原 SQL&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__86&quot;&gt;SELECT * FROM Orders WHERE UserId=@userId AND Status=@status&lt;/code&gt;&amp;nbsp;没有联合索引。优化后增加&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__87&quot;&gt;CREATE INDEX IX_Order_User_Status ON Orders(UserId,Status);&lt;/code&gt;，查询效率明显提升。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__88&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__89&quot;&gt;问题 3：热点数据重复查询&lt;/strong&gt;。部分商品信息变化较少，优化后引入 Redis 缓存，商品信息从缓存读取，订单服务不再重复查询数据库。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__90&quot;&gt;最终接口响应从优化前的 3000ms 降到 500ms 以内。需要说明，具体提升幅度取决于业务场景、数据规模和服务器配置，该案例主要用于说明优化思路。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__91&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E8AEB;line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #0E88EB;border-right-color: #000000;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__92&quot;&gt;7. 生产环境的持续监控与告警&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__93&quot;&gt;API 性能优化不是一次性的工作。很多系统上线初期运行正常，但随着数据增长、用户增加、请求量提升，性能会逐渐下降。因此生产环境必须建立持续监控体系。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;1）监控 API 指标&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__94&quot;&gt;重点关注平均响应时间和 P95/P99 延迟。例如平均 100ms 但 P99 是 3000ms，说明少部分请求非常慢，线上系统通常更加关注 P95/P99。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2）使用 OpenTelemetry 构建可观测体系&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__95&quot;&gt;现代 .NET 应用推荐 OpenTelemetry，可以统一采集 Metrics、Logs 和 Traces，结合 Prometheus、Grafana、&lt;span class=&quot;&quot;&gt;Jaeger&lt;/span&gt; 可以快速定位性能瓶颈。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3）结构化日志&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__96&quot;&gt;推荐使用 ILogger 或 Serilog 进行结构化日志记录，相比&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__97&quot;&gt;Console.WriteLine()&lt;/code&gt;，结构化日志可以查询字段、关联请求、分析问题。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;4）设置合理告警&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__98&quot;&gt;不要等用户反馈“系统很慢”才处理，应该提前发现 API P95 &amp;gt; 2 秒持续 5 分钟时触发告警，让团队提前处理。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: block;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__99&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E8AEB;line-height: 1.8em;letter-spacing: 0em;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 5px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #0E88EB;border-right-color: #000000;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;&quot; class=&quot;js_darkmode__100&quot;&gt;结论&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__101&quot;&gt;优化 C# .NET API 延迟，本质上不是简单地修改几行代码，而是一套系统工程。真正有效的方法通常包括：使用异步编程提高并发能力、优化数据库查询和索引、合理设计缓存策略、减少网络传输成本、优化序列化和响应大小、使用消息队列处理耗时任务、建立完善监控体系。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__102&quot;&gt;对于大多数 .NET 企业应用来说，性能瓶颈往往不是框架本身，而是不合理的数据访问方式、阻塞式代码、缺少缓存以及缺乏可观测能力。只有通过持续测量、分析和优化，才能让 API 在用户增长和业务复杂度提升后，依然保持稳定、高性能。&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/bPyoic67w6H2k3nnlwugA3iaibYuktDpUWnIKI8BiaHbTb9icabt1qhryYySLvWhsjsgeQm4RgianTTiaia6gUKJ23eZwjTFvIWA0zWafLiar4mUsVLw/640?wx_fmt=png&amp;amp;from=appmsg#imgIndex=0&quot; class=&quot;rich_pages wxw-img js_insertlocalimg&quot; data-ratio=&quot;1&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; type=&quot;block&quot; data-imgfileid=&quot;503383113&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;null&quot; data-index=&quot;3&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/bPyoic67w6H2k3nnlwugA3iaibYuktDpUWnIKI8BiaHbTb9icabt1qhryYySLvWhsjsgeQm4RgianTTiaia6gUKJ23eZwjTFvIWA0zWafLiar4mUsVLw/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1#imgIndex=0&quot; _width=&quot;614px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 657px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1785805067886&quot; data-report-img-idx=&quot;0&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__103&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;hr style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: solid;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: 1px;&quot; class=&quot;js_darkmode__104&quot;/&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px;&quot; class=&quot;js_darkmode__105&quot;&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 04 Aug 2026 09:09:39 +0800</pubDate></item><item><title>一个基于 PHP 语言开发的企业级短链接生成系统</title><link>https://www.codepub.top/post/651.html</link><description>&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;项目简介&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;短链接生成服务平台是一个专业的企业级短链接生成系统，提供稳定、快速、安全的短链接解决方案。支持自定义后缀、批量生成、&lt;span class=&quot;&quot;&gt;API接口&lt;/span&gt;等功能，适用于企业营销推广、社交媒体分享、短信营销等场景。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;项目地址：&lt;/span&gt;&lt;code style=&quot;color: rgb(99, 87, 83); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span class=&quot;wx_text_underline&quot;&gt;https://gitee.com/duzou_5aidnf/shortlink&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;功能特性&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;核心功能&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;短链接生成&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：快速生成短链接&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;自定义后缀&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持自定义短链接后缀&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;批量生成&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持一次性生成多个短链接&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;API接口&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：提供完善的API接口，方便开发者集成&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;多模板支持&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持多种模板风格（默认模板、现代模板、企业模板）&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;会员系统&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持VIP会员等级，提供不同特权&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;域名审核&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持域名提交和审核功能&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;数据统计&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：详细的点击统计和数据分析&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;支付系统&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持多种支付方式充值和开通会员&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;后台管理&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;用户管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：管理用户账号和权限&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;短链接管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：管理所有短链接&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span class=&quot;&quot;&gt;域名管理&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：管理可用域名&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;域名审核&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：审核用户提交的域名&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;新闻管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：发布和管理新闻资讯&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;支付管理&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：管理支付订单和记录&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;系统配置&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：配置网站基本信息和功能&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 20px; color: #635753; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;安全特性&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;HTTPS支持&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：支持HTTPS加密传输&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__19&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;数据加密&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：密码和敏感数据加密存储&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;防SQL注入&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：使用预处理语句防止SQL注入&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px; margin-bottom: 5px; color: rgb(99, 87, 83); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; font-weight: normal; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;✅&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color: rgb(99, 87, 83); font-weight: bold; background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(0, 0, 0, 0); width: auto; height: auto; margin: 0px; padding: 0px; border-style: none; border-width: 3px; border-color: rgba(0, 0, 0, 0.4); border-radius: 0px; visibility: visible;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;XSS防护&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：过滤用户输入，防止&lt;span class=&quot;&quot;&gt;XSS攻击&lt;/span&gt;&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;技术栈&lt;/span&gt;&lt;/h2&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__22&quot;&gt;后端&lt;/strong&gt;：PHP 7.0+&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__23&quot;&gt;数据库&lt;/strong&gt;：MySQL 5.5+&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__24&quot;&gt;前端&lt;/strong&gt;：HTML5, CSS3, JavaScript&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__25&quot;&gt;模板引擎&lt;/strong&gt;：自定义模板系统&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__26&quot;&gt;支付系统&lt;/strong&gt;：支持支付宝、微信支付、&lt;span class=&quot;&quot;&gt;易支付&lt;/span&gt;等&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__27&quot;&gt;API&lt;/strong&gt;：RESTful API设计&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;目录结构&lt;/span&gt;&lt;/h2&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__28&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__29&quot;&gt;shortlink-native/&lt;br/&gt;├── admin/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__30&quot;&gt;# 后台管理系统&lt;/span&gt;&lt;br/&gt;├── api/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__31&quot;&gt;# API接口&lt;/span&gt;&lt;br/&gt;├── includes/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__32&quot;&gt;# 核心功能模块&lt;/span&gt;&lt;br/&gt;├── install/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__33&quot;&gt;# 安装程序&lt;/span&gt;&lt;br/&gt;├── payment/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__34&quot;&gt;# 支付系统&lt;/span&gt;&lt;br/&gt;├── public/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__35&quot;&gt;# 静态资源和模板&lt;/span&gt;&lt;br/&gt;│ &amp;nbsp; └── templates/ &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__36&quot;&gt;# 模板文件&lt;/span&gt;&lt;br/&gt;├── about.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__37&quot;&gt;# 关于我们页面&lt;/span&gt;&lt;br/&gt;├── api.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__38&quot;&gt;# API文档页面&lt;/span&gt;&lt;br/&gt;├── contact.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__39&quot;&gt;# 联系我们页面&lt;/span&gt;&lt;br/&gt;├── custom.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__40&quot;&gt;# 自定义后缀页面&lt;/span&gt;&lt;br/&gt;├── index.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__41&quot;&gt;# 首页&lt;/span&gt;&lt;br/&gt;├── login.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__42&quot;&gt;# 登录页面&lt;/span&gt;&lt;br/&gt;├── logout.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__43&quot;&gt;# 退出页面&lt;/span&gt;&lt;br/&gt;├── news-detail.php &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__44&quot;&gt;# 新闻详情页面&lt;/span&gt;&lt;br/&gt;├── news.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__45&quot;&gt;# 新闻列表页面&lt;/span&gt;&lt;br/&gt;├── reg.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__46&quot;&gt;# 注册页面&lt;/span&gt;&lt;br/&gt;├── submit_domain.php &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__47&quot;&gt;# 提交域名页面&lt;/span&gt;&lt;br/&gt;├── urls.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__48&quot;&gt;# 批量生成页面&lt;/span&gt;&lt;br/&gt;├── user.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__49&quot;&gt;# 个人中心&lt;/span&gt;&lt;br/&gt;└── vip.php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #5c6370;font-style: italic;line-height: 26px;&quot; class=&quot;js_darkmode__50&quot;&gt;# 会员中心&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;安装说明&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;环境要求&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;PHP 7.0+&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;MySQL 5.5+&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;Apache 或 Nginx&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;支持URL重写&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;安装步骤&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;上传项目文件到服务器&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;设置目录权限：确保&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__51&quot;&gt;install/&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__52&quot;&gt;includes/&lt;/code&gt;&amp;nbsp;目录可写&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;访问&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__53&quot;&gt;http://yourdomain.com/install/&lt;/code&gt;&amp;nbsp;开始安装&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;按照安装向导完成数据库配置和系统设置&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;删除&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__54&quot;&gt;install/&lt;/code&gt;&amp;nbsp;目录（可选）&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;使用指南&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;生成短链接&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;访问首页&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__55&quot;&gt;http://yourdomain.com/&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;输入要缩短的URL&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;生成短链接&amp;quot;按钮&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;复制生成的短链接使用&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;自定义后缀&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;访问&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__56&quot;&gt;http://yourdomain.com/custom.php&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;输入要缩短的URL&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;输入自定义后缀（3-20个字符，支持字母、数字、下划线和横线）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;生成自定义短链接&amp;quot;按钮&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;批量生成&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;访问&amp;nbsp;&lt;code style=&quot;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__57&quot;&gt;http://yourdomain.com/urls.php&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;每行输入一个URL&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;批量生成&amp;quot;按钮&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;复制生成的短链接列表&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;提交域名审核&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;登录个人中心&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;提交域名&amp;quot;菜单&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;输入要提交的域名&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;提交审核&amp;quot;按钮&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;等待管理员审核&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;开通会员&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;登录个人中心&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;会员中心&amp;quot;菜单&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;选择会员等级和时长&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;选择支付方式&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;完成支付&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;API接口&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;接口地址&lt;/span&gt;&lt;/h3&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__58&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__59&quot;&gt;http://yourdomain.com/api/&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;认证方式&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;使用API密钥进行认证&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;在个人中心生成API密钥&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;主要接口&lt;/span&gt;&lt;/h3&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;生成短链接&lt;/span&gt;&lt;/h4&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__60&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__61&quot;&gt;POST /api/create.php&lt;br/&gt;参数：&lt;br/&gt;- url: 要缩短的URL&lt;br/&gt;- custom_code: 自定义后缀（可选）&lt;br/&gt;- domain_id: 域名ID（可选）&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;获取短链接信息&lt;/span&gt;&lt;/h4&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__62&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__63&quot;&gt;GET /api/info.php?code=short_code&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;列出短链接&lt;/span&gt;&lt;/h4&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__64&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__65&quot;&gt;GET /api/list.php?page=1&amp;amp;per_page=10&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;创建API密钥&lt;/span&gt;&lt;/h4&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__66&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__67&quot;&gt;POST /api/create_key.php&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;模板系统&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;模板类型&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__68&quot;&gt;default&lt;/strong&gt;：默认模板，简洁大方&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__69&quot;&gt;modern&lt;/strong&gt;：现代模板，时尚美观&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__70&quot;&gt;enterprise&lt;/strong&gt;：企业模板，专业稳重&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;切换模板&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;登录后台管理&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;系统配置&amp;quot;菜单&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;选择模板风格&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;保存配置&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;自定义模板&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;复制现有模板目录&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;修改模板文件&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;在后台选择自定义模板&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;后台管理&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;登录地址&lt;/span&gt;&lt;/h3&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__71&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__72&quot;&gt;http://yourdomain.com/admin/&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;管理员账号&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;默认管理员账号：admin&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;默认管理员密码：admin&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;登录后请立即修改密码&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;主要功能&lt;/span&gt;&lt;/h3&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;1. 系统配置&lt;/span&gt;&lt;/h4&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;网站基本信息配置&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;支付方式配置&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;会员等级配置&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;功能开关配置&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;2. 用户管理&lt;/span&gt;&lt;/h4&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;用户列表管理&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;用户信息修改&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;用户权限管理&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;用户充值记录&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;3. 短链接管理&lt;/span&gt;&lt;/h4&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;短链接列表&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;短链接搜索&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;短链接状态管理&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击统计查看&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;4. 域名管理&lt;/span&gt;&lt;/h4&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;域名列表&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;域名添加和删除&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;域名状态管理&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;5. 域名审核&lt;/span&gt;&lt;/h4&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;待审核域名列表&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;审核通过或拒绝&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;审核记录查看&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;6. 新闻管理&lt;/span&gt;&lt;/h4&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;新闻列表&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;新闻发布和编辑&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;新闻状态管理&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;7. 支付管理&lt;/span&gt;&lt;/h4&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;订单列表&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;充值记录&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;支付配置&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;支付系统&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;支持的支付方式&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅&amp;nbsp;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__73&quot;&gt;支付宝&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅&amp;nbsp;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__74&quot;&gt;微信支付&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅&amp;nbsp;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__75&quot;&gt;易支付&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅&amp;nbsp;&lt;strong style=&quot;color: rgb(99, 87, 83);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__76&quot;&gt;余额支付&lt;/strong&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;充值流程&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;登录个人中心&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;充值&amp;quot;按钮&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;选择充值金额&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;选择支付方式&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;完成支付&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;余额自动到账&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;开通会员流程&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;登录个人中心&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;点击&amp;quot;会员中心&amp;quot;菜单&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;选择会员等级和时长&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;选择支付方式&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;完成支付&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;会员等级立即生效&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;常见问题&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Q: 短链接有效期是多久？&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;A: 普通用户生成的短链接有效期为30天，VIP会员生成的短链接有效期为90天，SVIP会员生成的短链接永久有效。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Q: 如何修改网站logo和名称？&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;A: 登录后台管理，在系统配置中修改网站logo和名称。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Q: 如何添加新的域名？&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;A: 登录后台管理，在域名管理中添加新的域名。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Q: 如何审核用户提交的域名？&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;A: 登录后台管理，在域名审核中审核用户提交的域名。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Q: 如何查看短链接的点击统计？&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;A: 在个人中心可以查看自己生成的短链接的点击统计，在后台管理可以查看所有短链接的点击统计。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;Q: 如何生成API密钥？&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;A: 登录个人中心，在API密钥管理中生成API密钥。&lt;/p&gt;&lt;h2 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 22px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;更新日志&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 20px;color: #635753;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;v1.0.0 (2026-01-23)&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 初始版本发布&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 短链接生成功能&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 自定义后缀功能&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 批量生成功能&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ API接口&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 会员系统&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 支付系统&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 后台管理&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot;&gt;✅ 多模板支持&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(99, 87, 83);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot;&gt;感谢大家阅读，个人观点仅供参考，欢迎在评论区发表不同观点。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 03 Aug 2026 16:26:34 +0800</pubDate></item><item><title>这么好用的CMS建站系统你怎才告诉我，还骗我说你在用WordPress！</title><link>https://www.codepub.top/post/650.html</link><description>&lt;section style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); color: rgb(10, 10, 10); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; text-align: left; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;p style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); margin: 1.5em 8px; text-align: justify; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: 14px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;兄弟们，我今天彻底破防了。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); margin: 1.5em 8px; text-align: justify; line-height: 1.75; font-size: 14px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;前几天带哥们吃烧烤，顺便向他大吐苦水，说我最近为了给客户用 WordPress（简称WP）建个企业官网，天天加班到深夜，头发大把大把地掉：&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__4 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;•&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); font-weight: bold; text-align: left; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: inherit; color: rgb(15, 76, 129); visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;❌ 插件冲突&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：高高兴兴装个缓存插件，网站直接白屏崩溃。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;•&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); font-weight: bold; text-align: left; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: inherit; color: rgb(15, 76, 129); visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;❌ 速度卡顿&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：多传几张高清产品图，首页加载慢得像老牛拉车。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;•&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); font-weight: bold; text-align: left; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: inherit; color: rgb(15, 76, 129); visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;❌ 维护心累&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：三天两头提示更新，不更新又怕被黑客&lt;span class=&quot;&quot;&gt;挂马&lt;/span&gt;。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); margin: 1.5em 8px; text-align: justify; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: 14px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;结果我哥们听完，默默喝了口可乐，幽幽地来了一句：&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); font-weight: bold; text-align: left; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: inherit; color: rgb(15, 76, 129); visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;“其实我早就不用WP了。”&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); margin: 1.5em 8px; text-align: justify; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: 14px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;我一口串差点喷出来：“那你之前朋友圈晒的那些秒开、巨安全、客户满分满意的网站，是用啥做的？”&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); margin: 1.5em 8px; text-align: justify; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: 14px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;他擦擦嘴，吐出一个我从没听过的名字——&lt;/span&gt;&lt;strong style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); font-weight: bold; text-align: left; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: inherit; color: rgb(15, 76, 129); visibility: visible;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;VVCMS&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;text-align: center; visibility: visible;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;302473178&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUGoadG7kOS0Yh0x8V6N0GW4sL2EJBuTVubgccicfjqk2mhSxIl7ky3LAwfboOEtHjNT63VS2LoeF4QN3orkAiazzAy6pYrLKm5kE/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=1&quot; data-type=&quot;png&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;4&quot; data-ratio=&quot;0.5295420974889217&quot; data-w=&quot;1354&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUGoadG7kOS0Yh0x8V6N0GW4sL2EJBuTVubgccicfjqk2mhSxIl7ky3LAwfboOEtHjNT63VS2LoeF4QN3orkAiazzAy6pYrLKm5kE/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=1&quot; _width=&quot;677px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 677px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1785739756338&quot; data-report-img-idx=&quot;1&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); margin: 1.5em 8px; text-align: justify; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: 14px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;text-align: center; visibility: visible;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;302473177&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUHIVNyL2rVu7pYfJp9ibf0nQZK4iaB5GqEtZV1xialEGeKT8NldYLNemolpkU0AMgJ39cFwRMqGCuJqv243pQiaT1qsibwFgr2RWLQg/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=2&quot; data-type=&quot;png&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;5&quot; data-ratio=&quot;0.5295420974889217&quot; data-w=&quot;1354&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUHIVNyL2rVu7pYfJp9ibf0nQZK4iaB5GqEtZV1xialEGeKT8NldYLNemolpkU0AMgJ39cFwRMqGCuJqv243pQiaT1qsibwFgr2RWLQg/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=2&quot; _width=&quot;677px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 677px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1785739756338&quot; data-report-img-idx=&quot;2&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__18&quot;&gt;我连夜回家测试，体验完后直接失眠。&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__19&quot;&gt;这么好用的CMS建站系统你怎才告诉我？还天天骗我说你在用WP！&lt;/strong&gt;&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;border-width: 2px 0px 0px;border-style: solid;border-color: rgba(0, 0, 0, 0.1);height: 0.4em;color: inherit;margin: 1.5em 0px;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;transform-origin: 0px 0px;transform: scale(1, 0.5);&quot; class=&quot;js_darkmode__20&quot;/&gt;&lt;h3 style=&quot;box-sizing: border-box;border-width: 0px 0px 0px 3px;border-style: solid;border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(229, 229, 229) rgb(15, 76, 129);font-size: 15.4px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;padding-left: 8px;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__21&quot;&gt;🛑 苦WP久矣！传统建站的“三大全家桶”&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__22&quot;&gt;用过WP的站长或开发者，懂得都懂，这三个痛点简直是“慢性折磨”：&lt;/p&gt;&lt;ol style=&quot;list-style-type: none;&quot; class=&quot;js_darkmode__23 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;1.&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__25&quot;&gt;臃肿&lt;/strong&gt;：为了一个简单的功能，不得不堆砌大量插件。插件越多，网站越卡。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;2.&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__27&quot;&gt;高配&lt;/strong&gt;：想要网站跑得顺，服务器配置得往上加，钱包根本遭不住。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;3.&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__29&quot;&gt;漏洞&lt;/strong&gt;：作为全球最大的CMS，WP天然就是黑客的重点照顾对象。&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__30&quot;&gt;如果你也正被这些问题折磨，赶紧往下看。&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;border-width: 2px 0px 0px;border-style: solid;border-color: rgba(0, 0, 0, 0.1);height: 0.4em;color: inherit;margin: 1.5em 0px;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;transform-origin: 0px 0px;transform: scale(1, 0.5);&quot; class=&quot;js_darkmode__31&quot;/&gt;&lt;h3 style=&quot;box-sizing: border-box;border-width: 0px 0px 0px 3px;border-style: solid;border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(229, 229, 229) rgb(15, 76, 129);font-size: 15.4px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;padding-left: 8px;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__32&quot;&gt;🔥 &lt;span class=&quot;&quot;&gt;VVCMS&lt;/span&gt;：彻底告别“重工业”建站&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__33&quot;&gt;在体验了&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__34&quot;&gt;VVCMS&lt;/strong&gt;&amp;nbsp;之后，我发现它完美治好了我的“建站焦虑症”。这是一款真正把&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__35&quot;&gt;轻量、高效、安全&lt;/strong&gt;做到极致的国产开源建站系统。&lt;/p&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;302473176&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUHTqGBAqZOWvic1OlHqqnCg6OvxZib8YIufMNr13C1JlXgHEr7mcG9pftkibpth5DCexiaqkKn3wLGmdnzZGiaSVrVyM4ejJWMbAIaM/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=3&quot; data-type=&quot;png&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;6&quot; data-ratio=&quot;0.5295420974889217&quot; data-w=&quot;1354&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUHTqGBAqZOWvic1OlHqqnCg6OvxZib8YIufMNr13C1JlXgHEr7mcG9pftkibpth5DCexiaqkKn3wLGmdnzZGiaSVrVyM4ejJWMbAIaM/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=3&quot; _width=&quot;677px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 677px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1785739828038&quot; data-report-img-idx=&quot;3&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__36&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__37&quot;&gt;看了他们的核心功能，这几个直戳痛点的神级特性，才是同行偷偷背着我变强的秘密：&lt;/p&gt;&lt;h4 style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-size: 14px;font-weight: bold;margin: 2em 8px 0.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__38&quot;&gt;🚀 1. 极致轻量：告别卡顿，起步即秒开&lt;/h4&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__39 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__41&quot;&gt;拒绝臃肿&lt;/strong&gt;：原生代码没有任何多余的垃圾包，系统体积小到不可思议。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__43&quot;&gt;运行丝滑&lt;/strong&gt;：在几块钱的低配服务器上也能流畅跑起来，响应速度秒杀臃肿的WP。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-size: 14px;font-weight: bold;margin: 2em 8px 0.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__44&quot;&gt;🛡️ 2. 开箱即用：内置强大的安全机制&lt;/h4&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__45 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__47&quot;&gt;原生安全防护&lt;/strong&gt;：从底层架构上就杜绝了常见的注入与后门漏洞。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 再也不用天天担惊受怕、半夜爬起来修网站、清除黑客挂马了。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;302473173&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUGMiaLn1Nd5wVyRkiaibNZz1VG6yW9XTdqCorNiczBQaVmWlMmmVh2eL0gBnSd8g8XSCEibsDcQ1vCC1ngjQFk0wIAdvsk278c0gDZg/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=4&quot; data-type=&quot;png&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;7&quot; data-ratio=&quot;0.5295420974889217&quot; data-w=&quot;1354&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUGMiaLn1Nd5wVyRkiaibNZz1VG6yW9XTdqCorNiczBQaVmWlMmmVh2eL0gBnSd8g8XSCEibsDcQ1vCC1ngjQFk0wIAdvsk278c0gDZg/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=4&quot; _width=&quot;677px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 647px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1785739834198&quot; data-report-img-idx=&quot;4&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section&gt;&lt;br/&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-size: 14px;font-weight: bold;margin: 2em 8px 0.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__50&quot;&gt;📈 3. 原生SEO：不需要乱七八糟的插件&lt;/h4&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__51 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;• 自带完美的伪静态、&lt;span class=&quot;&quot;&gt;TDK&lt;/span&gt;设置和面包屑导航。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 对搜索引擎极为友好，上线就能开启良性收录，省去买SEO插件的冤枉钱。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;302473174&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUHppVXuryCjotbPf7pSOIX4Ee7znndVMVDUekbvm5LDrHkw43GJOBl9DeUUpmaYZux5dJ3IXGkcuOUaSrhJKReCAWT1A0icGHq0/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=5&quot; data-type=&quot;png&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;8&quot; data-ratio=&quot;0.5295420974889217&quot; data-w=&quot;1354&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/5947mU7BeUHppVXuryCjotbPf7pSOIX4Ee7znndVMVDUekbvm5LDrHkw43GJOBl9DeUUpmaYZux5dJ3IXGkcuOUaSrhJKReCAWT1A0icGHq0/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=5&quot; _width=&quot;677px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 647px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1785739835488&quot; data-report-img-idx=&quot;5&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section&gt;&lt;br/&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-size: 14px;font-weight: bold;margin: 2em 8px 0.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__55&quot;&gt;🛠️ 4. 极简操作：开发者和小白都爱了&lt;/h4&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__56 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__58&quot;&gt;模板调用极其灵活&lt;/strong&gt;：改版、仿站、写标签非常人性化，建站速度提升一倍。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__60&quot;&gt;后台傻瓜式操作&lt;/strong&gt;：做完网站交付给客户，客户一分钟就能学会怎么发文章、改产品。再也没有客户天天微信弹窗问你“这个怎么改”的痛苦了！&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;302473175&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/5947mU7BeUE7LLrElbrPQZuTukSvYZ34iaGMV7OYnrZ6UKLxwOVBLDTSGRu1T9vg5Lp8c7gia3tSVD68CvlseHA9hibveYJ8h0NjsVkvaSerCE/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=6&quot; data-type=&quot;png&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;9&quot; data-ratio=&quot;0.5295420974889217&quot; data-w=&quot;1354&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/5947mU7BeUE7LLrElbrPQZuTukSvYZ34iaGMV7OYnrZ6UKLxwOVBLDTSGRu1T9vg5Lp8c7gia3tSVD68CvlseHA9hibveYJ8h0NjsVkvaSerCE/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=6&quot; _width=&quot;677px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 647px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1785739836959&quot; data-report-img-idx=&quot;6&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section&gt;&lt;br/&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;box-sizing: border-box;border-width: 2px 0px 0px;border-style: solid;border-color: rgba(0, 0, 0, 0.1);height: 0.4em;color: inherit;margin: 1.5em 0px;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;transform-origin: 0px 0px;transform: scale(1, 0.5);&quot; class=&quot;js_darkmode__62&quot;/&gt;&lt;h3 style=&quot;box-sizing: border-box;border-width: 0px 0px 0px 3px;border-style: solid;border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(229, 229, 229) rgb(15, 76, 129);font-size: 15.4px;font-weight: bold;margin: 2em 8px 0.75em 0px;text-align: left;line-height: 1.2;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;padding-left: 8px;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__63&quot;&gt;💡 总结：建站新人的“真香”选择&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__64&quot;&gt;如果你现在正准备搭建&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__65&quot;&gt;企业官网、个人博客、工作室作品集、或者是行业门户网站&lt;/strong&gt;，真的别再盲目跟风去折腾那些笨重、难调、需要天天打补丁的国外系统了。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__66&quot;&gt;给自己的头发放个假，赶紧去试试&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__67&quot;&gt;VVCMS&lt;/strong&gt;&amp;nbsp;吧。&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__68&quot;&gt;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__69&quot;&gt;👉 即刻前往体验：&lt;/strong&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__70 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__72&quot;&gt;官方网站&lt;/strong&gt;：&lt;span style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: #E5E5E5;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;color: #576B95;&quot; class=&quot;js_darkmode__73&quot;&gt;www.vvcms.cn&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: inherit;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__75&quot;&gt;核心功能亮点&lt;/strong&gt;：&lt;span style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: #E5E5E5;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;color: #576B95;&quot; class=&quot;js_darkmode__76&quot;&gt;www.vvcms.cn/feature&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__77&quot;&gt;不要像我一样，等到被同行拉开差距了，才拍着大腿问：“为什么不早点告诉我！”&lt;/p&gt;&lt;hr style=&quot;box-sizing: border-box;border-width: 2px 0px 0px;border-style: solid;border-color: rgba(0, 0, 0, 0.1);height: 0.4em;color: inherit;margin: 1.5em 0px;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;transform-origin: 0px 0px;transform: scale(1, 0.5);&quot; class=&quot;js_darkmode__78&quot;/&gt;&lt;h4 style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-size: 14px;font-weight: bold;margin: 2em 8px 0.5em;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;color: rgb(15, 76, 129);&quot; class=&quot;js_darkmode__79&quot;&gt;💬 互动区&lt;/h4&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__80&quot;&gt;你现在建站还在用什么系统？被它的插件折磨过吗？欢迎在评论区一起吐槽分享！&lt;/p&gt;&lt;/section&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 0px;color: rgb(10, 10, 10);font-family: ui-sans-serif, system-ui, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 0px;line-height: 0;&quot; class=&quot;js_darkmode__81&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);margin: 1.5em 8px;text-align: justify;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.1em;color: rgb(63, 63, 63);&quot; class=&quot;js_darkmode__82&quot;&gt;&lt;span data-pm-slice=&quot;1 1 [&amp;quot;para&amp;quot;,{&amp;quot;tagName&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;attributes&amp;quot;:{&amp;quot;style&amp;quot;:&amp;quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); color: rgb(10, 10, 10); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; text-align: left; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, \&amp;quot;Helvetica Neue\&amp;quot;, \&amp;quot;PingFang SC\&amp;quot;, \&amp;quot;Hiragino Sans GB\&amp;quot;, \&amp;quot;Microsoft YaHei UI\&amp;quot;, \&amp;quot;Microsoft YaHei\&amp;quot;, Arial, sans-serif;&amp;quot;},&amp;quot;namespaceURI&amp;quot;:&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;},&amp;quot;para&amp;quot;,{&amp;quot;tagName&amp;quot;:&amp;quot;p&amp;quot;,&amp;quot;attributes&amp;quot;:{&amp;quot;style&amp;quot;:&amp;quot;box-sizing: border-box; border-width: 0px; border-style: solid; border-color: rgb(229, 229, 229); margin: 1.5em 8px; text-align: justify; line-height: 1.75; font-family: -apple-system-font, BlinkMacSystemFont, \&amp;quot;Helvetica Neue\&amp;quot;, \&amp;quot;PingFang SC\&amp;quot;, \&amp;quot;Hiragino Sans GB\&amp;quot;, \&amp;quot;Microsoft YaHei UI\&amp;quot;, \&amp;quot;Microsoft YaHei\&amp;quot;, Arial, sans-serif; font-size: 14px; letter-spacing: 0.1em; color: rgb(63, 63, 63);&amp;quot;},&amp;quot;namespaceURI&amp;quot;:&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;}]&quot;&gt;最后：VVCMS完全免费，所有的模板全部免费，提供在线演示，喜欢哪个，下载哪个，毫无保留，没有任何套路。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 03 Aug 2026 14:55:20 +0800</pubDate></item><item><title>用 C# Socket 从 0 手写一个 HTTP 服务器，揭开 Web 的神秘面纱</title><link>https://www.codepub.top/post/649.html</link><description>&lt;h1 data-tool=&quot;mdnice编辑器&quot; style=&quot;border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(239, 112, 96); margin: 30px 0px 15px; padding: 0px; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none none solid; border-width: 1px 1px 2px; border-radius: 0px; box-shadow: none; display: flex; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.1em; overflow: unset; text-align: left; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;font-size: 22px; color: #FFFFFF; background: none 0% 0% / auto no-repeat scroll padding-box border-box #EF7060; line-height: 1.5em; letter-spacing: 0em; align-items: unset; border-style: none; border-width: 1px; border-color: #000000; border-radius: 3px 3px 0px 0px; box-shadow: none; display: inline-block; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; margin: 0px 5px 0px 0px; overflow: unset; padding: 3px 10px 1px; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;前言&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;border-color: #000000 transparent #EFEBE9 #000000; align-items: unset; background-attachment: scroll; background-clip: border-box; background-color: unset; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none solid solid none; border-width: 1px 20px 36px 1px; border-radius: 0px; box-shadow: none; color: #000000; display: inline-block; font-size: 16px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.1em; margin: 0px; overflow: unset; padding: 0px; text-align: left; text-indent: 0em; text-shadow: none; transform: none; width: auto; -webkit-box-reflect: unset; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;嗨，各位程序员小伙伴们，大家早上好啊！️&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;在现代软件开发中，我们习惯了使用 ASP.NET Core、Spring Boot 这样强大的框架。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;只要敲下几行代码，配置好路由，一个功能完备的 Web 服务器就搭好了。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;这种“开箱即用”的体验固然爽，但久而久之，Web 开发在我们眼里就成了一个“黑盒”。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;你有没有想过：&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;当你在浏览器地址栏输入网址并按下回车的那一瞬间，到底发生了什么？&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 16px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;服务器又是如何精准地知道你想要哪个页面的？&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__11&quot;&gt;其实，剥开那些复杂的框架外衣，Web 的本质无非就是&amp;nbsp;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__12&quot;&gt;TCP 连接 + 文本协议&lt;/strong&gt;。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__13&quot;&gt;今天，老杨就带大家跳出舒适区，用最底层的 C# Socket，从 0 手写一个简易的 HTTP 服务器。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__14&quot;&gt;相信我，当你亲自构造出 HTTP 响应报文的那一刻，你对网络编程的理解绝对会上升到一个新的高度！&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__15&quot;&gt;废话不多说，让我们打开 Visual Studio，开始这场“造轮子”之旅！&lt;/p&gt;&lt;h1 data-tool=&quot;mdnice编辑器&quot; style=&quot; border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset; text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; &quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot; font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px; text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; &quot; class=&quot;js_darkmode__17&quot;&gt;Step by Step 步骤&lt;/span&gt;&lt;span style=&quot; border-bottom-color: #EFEBE9;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: #000000;border-left-color: #000000;border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: #000000;display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px; text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; &quot; class=&quot;js_darkmode__18&quot;&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__19&quot;&gt;1. 创建控制台项目，命名为&amp;nbsp;&lt;code&gt;SimpleHttpServer&lt;/code&gt;&lt;/span&gt;&lt;/h4&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__20&quot;&gt;2. 引入 &lt;span class=&quot;&quot;&gt;Socket&lt;/span&gt; 相关的命名空间&lt;/span&gt;&lt;/h4&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__21&quot;&gt;打开&amp;nbsp;&lt;code style=&quot;color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__22&quot;&gt;Program.cs&lt;/code&gt;&amp;nbsp;文件，在顶部添加：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: black;padding-top: 15px;background: #fff;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__25&quot;&gt;using&lt;/span&gt;&amp;nbsp;System;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__26&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Net;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__27&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Net.Sockets;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__28&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Text;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__29&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Threading;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__30&quot;&gt;3. 编写主逻辑&lt;/span&gt;&lt;/h4&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__31&quot;&gt;实现一个循环，不断接受客户端连接，并为每个连接启动一个新线程处理，留意代码中的注释：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: black;padding-top: 15px;background: #fff;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__34&quot;&gt;using&lt;/span&gt;&amp;nbsp;System;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__35&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Net;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__36&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Net.Sockets;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__37&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Text;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__38&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Threading;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__39&quot;&gt;namespace&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__40&quot;&gt;SimpleHttpServer&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__41&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__42&quot;&gt;Program&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__43&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__44&quot;&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__45&quot;&gt;Main&lt;/span&gt;(&lt;span style=&quot;color: #5c2699;line-height: 26px;&quot; class=&quot;js_darkmode__46&quot;&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__47&quot;&gt;string&lt;/span&gt;[] args&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__48&quot;&gt;// 1. 定义监听的 IP 地址和端口号&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__49&quot;&gt;// &amp;nbsp; &amp;nbsp;这里监听本机所有 IP 地址（IPv4），端口 8080&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IPAddress ip = IPAddress.Any;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__50&quot;&gt;int&lt;/span&gt;&amp;nbsp;port =&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__51&quot;&gt;8080&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__52&quot;&gt;// 2. 创建 TcpListener 对象，开始监听&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TcpListener listener =&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__53&quot;&gt;new&lt;/span&gt;&amp;nbsp;TcpListener(ip, port);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listener.Start();&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__54&quot;&gt;$&amp;quot;HTTP 服务器已启动，监听&amp;nbsp;&lt;span style=&quot;color: #000;line-height: 26px;&quot; class=&quot;js_darkmode__55&quot;&gt;{ip}&lt;/span&gt;:&lt;span style=&quot;color: #000;line-height: 26px;&quot; class=&quot;js_darkmode__56&quot;&gt;{port}&lt;/span&gt;&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__57&quot;&gt;&amp;quot;请在浏览器中访问 http://localhost:8080/&amp;quot;&lt;/span&gt;);&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__58&quot;&gt;// 3. 无限循环，等待客户端连接&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__59&quot;&gt;while&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__60&quot;&gt;true&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__61&quot;&gt;// 4. 接受一个客户端连接（阻塞直到有连接）&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TcpClient client = listener.AcceptTcpClient();&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__62&quot;&gt;$&amp;quot;客户端已连接：&lt;span style=&quot;color: #000;line-height: 26px;&quot; class=&quot;js_darkmode__63&quot;&gt;{client.Client.RemoteEndPoint}&lt;/span&gt;&amp;quot;&lt;/span&gt;);&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__64&quot;&gt;// 5. 为每个客户端创建一个新线程处理，避免阻塞后续连接&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ThreadPool.QueueUserWorkItem(HandleClient, client);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__65&quot;&gt;&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;///&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__66&quot;&gt;&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;///&lt;/span&gt;&amp;nbsp;处理单个客户端请求的方法（由线程池调用）&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__67&quot;&gt;&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;///&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__68&quot;&gt;&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;///&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;&amp;lt;param name=&amp;quot;state&amp;quot;&amp;gt;&lt;/span&gt;传入的 TcpClient 对象&lt;span style=&quot;font-weight: bold;line-height: 26px;&quot;&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__69&quot;&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__70&quot;&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__71&quot;&gt;HandleClient&lt;/span&gt;(&lt;span style=&quot;color: #5c2699;line-height: 26px;&quot; class=&quot;js_darkmode__72&quot;&gt;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__73&quot;&gt;object&lt;/span&gt;&amp;nbsp;state&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TcpClient client = (TcpClient)state;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__74&quot;&gt;// 确保使用完释放资源&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__75&quot;&gt;using&lt;/span&gt;&amp;nbsp;(client)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__76&quot;&gt;try&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__77&quot;&gt;// 获取网络流，用于读写数据&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NetworkStream stream = client.GetStream();&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__78&quot;&gt;// 1. 读取客户端发来的 HTTP 请求&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__79&quot;&gt;// &amp;nbsp; &amp;nbsp;先分配一个缓冲区，读取前 1024 字节，通常足够包含请求行和头部&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__80&quot;&gt;byte&lt;/span&gt;[] buffer =&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__81&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__82&quot;&gt;byte&lt;/span&gt;[&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__83&quot;&gt;1024&lt;/span&gt;];&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__84&quot;&gt;int&lt;/span&gt;&amp;nbsp;bytesRead = stream.Read(buffer,&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__85&quot;&gt;0&lt;/span&gt;, buffer.Length);&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__86&quot;&gt;// 将收到的字节转换为字符串（只取实际读取的部分）&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__87&quot;&gt;string&lt;/span&gt;&amp;nbsp;request = Encoding.UTF8.GetString(buffer,&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__88&quot;&gt;0&lt;/span&gt;, bytesRead);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__89&quot;&gt;&amp;quot;收到请求：&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(request.Substring(&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__90&quot;&gt;0&lt;/span&gt;, Math.Min(request.Length,&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__91&quot;&gt;200&lt;/span&gt;)));&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__92&quot;&gt;// 只打印前200字符&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__93&quot;&gt;// 2. 解析请求行（第一行）&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__94&quot;&gt;// &amp;nbsp; &amp;nbsp;请求行格式：METHOD /path HTTP/1.1&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__95&quot;&gt;string&lt;/span&gt;&amp;nbsp;firstLine = request.Substring(&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__96&quot;&gt;0&lt;/span&gt;, request.IndexOf(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__97&quot;&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;));&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__98&quot;&gt;string&lt;/span&gt;[] parts = firstLine.Split(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__99&quot;&gt;&amp;#39; &amp;#39;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__100&quot;&gt;string&lt;/span&gt;&amp;nbsp;method = parts[&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__101&quot;&gt;0&lt;/span&gt;]; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__102&quot;&gt;// GET / POST 等&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__103&quot;&gt;string&lt;/span&gt;&amp;nbsp;path = parts[&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__104&quot;&gt;1&lt;/span&gt;]; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__105&quot;&gt;// 请求的资源路径，如 &amp;quot;/&amp;quot; 或 &amp;quot;/index.html&amp;quot;&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__106&quot;&gt;$&amp;quot;请求方法：&lt;span style=&quot;color: #000;line-height: 26px;&quot; class=&quot;js_darkmode__107&quot;&gt;{method}&lt;/span&gt;，路径：&lt;span style=&quot;color: #000;line-height: 26px;&quot; class=&quot;js_darkmode__108&quot;&gt;{path}&lt;/span&gt;&amp;quot;&lt;/span&gt;);&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__109&quot;&gt;// 3. 根据路径构造不同的响应内容&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__110&quot;&gt;string&lt;/span&gt;&amp;nbsp;responseBody;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__111&quot;&gt;if&lt;/span&gt;&amp;nbsp;(path ==&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__112&quot;&gt;&amp;quot;/&amp;quot;&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; responseBody =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__113&quot;&gt;&amp;quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;欢迎来到简易 HTTP 服务器&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;这是根路径&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__114&quot;&gt;else&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__115&quot;&gt;if&lt;/span&gt;&amp;nbsp;(path ==&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__116&quot;&gt;&amp;quot;/about&amp;quot;&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; responseBody =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__117&quot;&gt;&amp;quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;关于页面&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;这是一个用 .NET Framework 4.8 Socket 实现的服务器&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__118&quot;&gt;else&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__119&quot;&gt;// 404 Not Found&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; responseBody =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__120&quot;&gt;&amp;quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;404 - 页面未找到&amp;lt;/h1&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__121&quot;&gt;// 4. 构造 HTTP 响应报文&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__122&quot;&gt;// &amp;nbsp; &amp;nbsp;状态行：HTTP/1.1 200 OK（或 404 Not Found）&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__123&quot;&gt;// &amp;nbsp; &amp;nbsp;响应头：Content-Type, Content-Length, Connection 等&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__124&quot;&gt;// &amp;nbsp; &amp;nbsp;空行分隔头和体&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__125&quot;&gt;string&lt;/span&gt;&amp;nbsp;statusLine;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__126&quot;&gt;if&lt;/span&gt;&amp;nbsp;(path ==&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__127&quot;&gt;&amp;quot;/&amp;quot;&lt;/span&gt;&amp;nbsp;|| path ==&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__128&quot;&gt;&amp;quot;/about&amp;quot;&lt;/span&gt;)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; statusLine =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__129&quot;&gt;&amp;quot;HTTP/1.1 200 OK\r\n&amp;quot;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__130&quot;&gt;else&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; statusLine =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__131&quot;&gt;&amp;quot;HTTP/1.1 404 Not Found\r\n&amp;quot;&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__132&quot;&gt;string&lt;/span&gt;&amp;nbsp;contentType =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__133&quot;&gt;&amp;quot;Content-Type: text/html; charset=utf-8\r\n&amp;quot;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__134&quot;&gt;string&lt;/span&gt;&amp;nbsp;contentLength =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__135&quot;&gt;$&amp;quot;Content-Length:&amp;nbsp;&lt;span style=&quot;color: #000;line-height: 26px;&quot; class=&quot;js_darkmode__136&quot;&gt;{Encoding.UTF8.GetByteCount(responseBody)}&lt;/span&gt;\r\n&amp;quot;&lt;/span&gt;;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__137&quot;&gt;string&lt;/span&gt;&amp;nbsp;connection =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__138&quot;&gt;&amp;quot;Connection: close\r\n&amp;quot;&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__139&quot;&gt;// 短连接，处理完即关闭&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__140&quot;&gt;string&lt;/span&gt;&amp;nbsp;blankLine =&amp;nbsp;&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__141&quot;&gt;&amp;quot;\r\n&amp;quot;&lt;/span&gt;;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__142&quot;&gt;// 拼接完整的响应字符串&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__143&quot;&gt;// 注意：响应头之后必须有一个空行&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__144&quot;&gt;string&lt;/span&gt;&amp;nbsp;responseString = statusLine + contentType + contentLength + connection + blankLine + responseBody;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__145&quot;&gt;// 5. 将响应字符串转为字节数组并发送给客户端&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__146&quot;&gt;byte&lt;/span&gt;[] responseBytes = Encoding.UTF8.GetBytes(responseString);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.Write(responseBytes,&amp;nbsp;&lt;span style=&quot;color: #1c00cf;line-height: 26px;&quot; class=&quot;js_darkmode__147&quot;&gt;0&lt;/span&gt;, responseBytes.Length);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.Flush();&amp;nbsp;&lt;span style=&quot;color: #007400;line-height: 26px;&quot; class=&quot;js_darkmode__148&quot;&gt;// 确保数据立即发送&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__149&quot;&gt;&amp;quot;响应已发送，关闭连接。&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #aa0d91;line-height: 26px;&quot; class=&quot;js_darkmode__150&quot;&gt;catch&lt;/span&gt;&amp;nbsp;(Exception ex)&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&lt;span style=&quot;color: #c41a16;line-height: 26px;&quot; class=&quot;js_darkmode__151&quot;&gt;&amp;quot;处理客户端时出错：&amp;quot;&lt;/span&gt;&amp;nbsp;+ ex.Message);&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #000000;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__152&quot;&gt;4. 运行与测试&lt;/span&gt;&lt;/h4&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot;js_darkmode__153 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__154&quot;&gt;&lt;p style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__155&quot;&gt;按&amp;nbsp;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__156&quot;&gt;F5&lt;/strong&gt;&amp;nbsp;启动程序，控制台会显示：&lt;/p&gt;&lt;pre style=&quot;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__157&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;color: rgb(30, 107, 184);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;word-break: break-all;padding-top: 15px;background: #fff;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__158&quot;&gt;HTTP 服务器已启动，监听 0.0.0.0:8080&lt;br/&gt;请在浏览器中访问 http://localhost:8080/&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__159&quot;&gt;&lt;p style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__160&quot;&gt;打开浏览器，访问&amp;nbsp;&lt;code style=&quot;height: auto;color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__161&quot;&gt;http://localhost:8080/&lt;/code&gt;，应该看到：&lt;/p&gt;&lt;blockquote style=&quot;margin-top: 20px;margin-bottom: 20px;margin-left: 0px;margin-right: 0px;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;display: block;overflow-x: auto;overflow-y: auto;&quot; class=&quot;js_darkmode__162&quot;&gt;&lt;p style=&quot;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;&quot; class=&quot;js_darkmode__163&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__164&quot;&gt;欢迎来到简易 HTTP 服务器&lt;/strong&gt;&lt;br/&gt;这是根路径&lt;/p&gt;&lt;/blockquote&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__165&quot;&gt;&lt;p style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__166&quot;&gt;访问&amp;nbsp;&lt;code style=&quot;height: auto;color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__167&quot;&gt;http://localhost:8080/about&lt;/code&gt;，看到：&lt;/p&gt;&lt;blockquote style=&quot;margin-top: 20px;margin-bottom: 20px;margin-left: 0px;margin-right: 0px;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;display: block;overflow-x: auto;overflow-y: auto;&quot; class=&quot;js_darkmode__168&quot;&gt;&lt;p style=&quot;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;&quot; class=&quot;js_darkmode__169&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__170&quot;&gt;关于页面&lt;/strong&gt;&lt;br/&gt;这是一个用 .NET Framework 4.8 Socket 实现的服务器&lt;/p&gt;&lt;/blockquote&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__171&quot;&gt;&lt;p style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__172&quot;&gt;访问其他任意路径（如&amp;nbsp;&lt;code style=&quot;height: auto;color: rgb(30, 107, 184);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__173&quot;&gt;http://localhost:8080/test&lt;/code&gt;），看到 404 页面。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__174&quot;&gt;&lt;p style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__175&quot;&gt;观察控制台输出，可以看到每次请求的信息。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h1 data-tool=&quot;mdnice编辑器&quot; style=&quot; border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset; text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; &quot; class=&quot;js_darkmode__176&quot;&gt;&lt;span style=&quot; font-size: 22px;color: #FFFFFF;background-color: #EF7060;line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: #000000;border-bottom-color: #000000;border-left-color: #000000;border-right-color: #000000;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px; text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; &quot; class=&quot;js_darkmode__177&quot;&gt;总结&lt;/span&gt;&lt;span style=&quot; border-bottom-color: #EFEBE9;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: #000000;border-left-color: #000000;border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: #000000;display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px; text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; &quot; class=&quot;js_darkmode__178&quot;&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__179&quot;&gt;好了，今天的分享就到这里啦！&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__180&quot;&gt;通过这几十行代码，我们其实已经抓住了 Web 开发的“灵魂”。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__181&quot;&gt;你会发现，所谓的 HTTP 协议，本质上就是客户端和服务器之间按照特定格式（请求行、请求头、空行、正文）进行的文本对话。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__182&quot;&gt;当然，我们今天写的只是一个“玩具级”的服务器。它没有处理并发异常、没有支持长连接（&lt;span class=&quot;&quot;&gt;Keep-Alive&lt;/span&gt;）、也没有处理复杂的 POST 请求体。在真实的生产环境中，我们依然需要依赖 ASP.NET Core 或 Nginx 这样成熟的工业级组件。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__183&quot;&gt;但是，&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__184&quot;&gt;“知其然，更要知其所以然”&lt;/strong&gt;。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__185&quot;&gt;当你以后在排查复杂的网络问题，或者需要优化服务器性能时，今天这段底层 Socket 编程的经验，绝对会成为你最强有力的武器！&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__186&quot;&gt;如果觉得这篇文章让你对网络编程有了新的认识，别忘了点个【赞与在看】哦，你的支持是我最大的动力！&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__187&quot;&gt;我们下期技术分享再见！&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__188&quot;&gt;如果你有更好的想法或建议，欢迎留言讨论！&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__189&quot;&gt;&lt;strong style=&quot;color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__190&quot;&gt;&lt;span style=&quot;color: #0080ff;&quot;&gt;关键词&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__191&quot;&gt;C#、Socket、网络编程、Web底层&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 03 Aug 2026 11:24:38 +0800</pubDate></item></channel></rss>