{"id":6646,"date":"2025-09-29T12:30:20","date_gmt":"2025-09-29T04:30:20","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=6646"},"modified":"2025-09-29T12:30:29","modified_gmt":"2025-09-29T04:30:29","slug":"springboot%e5%85%a8%e5%b1%80-%e5%b1%80%e9%83%a8%e5%8f%8c%e6%a8%a1%e5%bc%8fgzip%e5%8e%8b%e7%bc%a9%e5%ae%9e%e6%88%98%ef%bc%9a14mb-geojson%e7%a7%92%e5%8f%983mb","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/springboot%e5%85%a8%e5%b1%80-%e5%b1%80%e9%83%a8%e5%8f%8c%e6%a8%a1%e5%bc%8fgzip%e5%8e%8b%e7%bc%a9%e5%ae%9e%e6%88%98%ef%bc%9a14mb-geojson%e7%a7%92%e5%8f%983mb\/","title":{"rendered":"SpringBoot\u5168\u5c40\/\u5c40\u90e8\u53cc\u6a21\u5f0fGzip\u538b\u7f29\u5b9e\u6218\uff1a14MB GeoJSON\u79d2\u53d83MB"},"content":{"rendered":"\n<p>\u5728\u5f53\u4eca\u6570\u5b57\u5316\u65f6\u4ee3\uff0c\u968f\u7740\u4e92\u8054\u7f51\u5e94\u7528\u7684\u98de\u901f\u53d1\u5c55\uff0c\u6570\u636e\u4f20\u8f93\u7684\u6548\u7387\u548c\u6027\u80fd\u6210\u4e3a\u4e86\u81f3\u5173\u91cd\u8981\u7684\u95ee\u9898\u3002GeoJSON \u662f\u4e00\u79cd\u57fa\u4e8e JSON \u683c\u5f0f\u7684\u5730\u7406\u7a7a\u95f4\u6570\u636e\u4ea4\u6362\u683c\u5f0f\uff0c\u5b83\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5730\u7406\u4fe1\u606f\u7cfb\u7edf\uff08GIS\uff09\u9886\u57df\uff0c\u7528\u4e8e\u63cf\u8ff0\u5730\u7406\u7a7a\u95f4\u6570\u636e\u7684\u51e0\u4f55\u5f62\u72b6\u3001\u5c5e\u6027\u7b49\u4fe1\u606f\u3002<\/p>\n\n\n\n<p>GeoJSON \u6570\u636e\u901a\u5e38\u5305\u542b\u5927\u91cf\u7684\u5730\u7406\u5750\u6807\u70b9\u3001\u51e0\u4f55\u5f62\u72b6\u7b49\u4fe1\u606f\uff0c\u6570\u636e\u91cf\u5f80\u5f80\u8f83\u5927\u3002\u5728 Web \u5730\u7406\u4fe1\u606f\u7cfb\u7edf\u5e94\u7528\u4e2d\uff0c\u5982\u5730\u56fe\u5c55\u793a\u3001\u5730\u7406\u6570\u636e\u53ef\u89c6\u5316\u7b49\u573a\u666f\uff0cGeoJSON \u6570\u636e\u7684\u4f20\u8f93\u6548\u7387\u76f4\u63a5\u5173\u7cfb\u5230\u5730\u56fe\u52a0\u8f7d\u7684\u901f\u5ea6\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n\n\n\n<p>\u56e0\u6b64\uff0c\u5bf9 GeoJSON \u6570\u636e\u8fdb\u884c\u6709\u6548\u7684\u538b\u7f29\uff0c\u4ee5\u51cf\u5c11\u6570\u636e\u4f20\u8f93\u7684\u4f53\u79ef\uff0c\u663e\u5f97\u5c24\u4e3a\u91cd\u8981\u3002\u5bf9\u4e8e\u57fa\u4e8eSpringBoot \u6846\u67b6\u6784\u5efa\u7684 WebGIS \u5e94\u7528\u6765\u8bf4\uff0c\u5982\u4f55\u9ad8\u6548\u5730\u4f20\u8f93\u6570\u636e\u3001\u51cf\u5c11\u7f51\u7edc\u5e26\u5bbd\u7684\u5360\u7528\uff0c\u662f\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u548c\u7cfb\u7edf\u6027\u80fd\u7684\u5173\u952e\u6240\u5728\u3002<\/p>\n\n\n\n<p>\u800c Gzip \u538b\u7f29\u6280\u672f\uff0c\u4f5c\u4e3a\u4e00\u79cd\u88ab\u5e7f\u6cdb\u91c7\u7528\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u65e0\u7591\u4e3a\u8fd9\u4e00\u95ee\u9898\u7684\u89e3\u51b3\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u52a9\u529b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-1024x575.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-6647 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-1024x575.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-300x168.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-768x431.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-1024x575.png\" alt=\"\" class=\"wp-image-6647\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-1024x575.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-300x168.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-768x431.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<p>\u4ee5 GeoJSON \u6570\u636e\u4e3a\u4f8b\uff0c\u901a\u8fc7\u5728 SpringBoot \u5e94\u7528\u4e2d\u5f00\u542f Gzip \u538b\u7f29\uff0c\u5bf9 GeoJSON \u6570\u636e\u8fdb\u884c\u7626\u8eab\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u663e\u8457\u51cf\u5c11\u6570\u636e\u4f20\u8f93\u7684\u4f53\u79ef\uff0c\u63d0\u9ad8\u5730\u56fe\u52a0\u8f7d\u7684\u901f\u5ea6\uff0c\u8fd8\u53ef\u4ee5\u63d0\u5347\u7528\u6237\u7684\u4ea4\u4e92\u4f53\u9a8c\u3002\u5728\u5b9e\u9645\u7684 Web \u5730\u7406\u4fe1\u606f\u7cfb\u7edf\u5f00\u53d1\u4e2d\uff0c\u8fd9\u79cd\u4f18\u5316\u624b\u6bb5\u662f\u975e\u5e38\u5b9e\u7528\u548c\u6709\u6548\u7684\u3002\u901a\u8fc7\u5bf9 GeoJSON \u6570\u636e\u7684\u538b\u7f29\u5904\u7406\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u597d\u5730\u6ee1\u8db3\u7528\u6237\u5bf9\u4e8e\u5730\u56fe\u5feb\u901f\u52a0\u8f7d\u548c\u6d41\u7545\u4ea4\u4e92\u7684\u9700\u6c42\uff0c\u540c\u65f6\u4e5f\u4e3a\u6574\u4e2a\u5e94\u7528\u7684\u6027\u80fd\u4f18\u5316\u63d0\u4f9b\u4e86\u6709\u529b\u7684\u652f\u6301\u3002<\/p>\n\n\n\n<p>\u5728\u63a5\u4e0b\u6765\u7684\u5185\u5bb9\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5728 SpringBoot \u4e2d\u5f00\u542f Gzip \u538b\u7f29\u7684\u4e24\u79cd\u65b9\u5f0f\u7684\u5177\u4f53\u5b9e\u73b0\u6b65\u9aa4\uff0c\u5e76\u901a\u8fc7\u5b9e\u9645\u7684 GeoJSON \u6570\u636e\u538b\u7f29\u6848\u4f8b\uff0c\u5c55\u793a\u8fd9\u4e24\u79cd\u65b9\u5f0f\u7684\u5e94\u7528\u6548\u679c\u548c\u4f18\u7f3a\u70b9\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u80fd\u591f\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u7406\u89e3\u548c\u638c\u63e1\u5728 SpringBoot \u5e94\u7528\u4e2d\u4f7f\u7528 Gzip \u538b\u7f29\u6280\u672f\u7684\u65b9\u6cd5\uff0c\u4ece\u800c\u63d0\u5347\u81ea\u5df1\u5f00\u53d1\u7684 WebGIS \u5e94\u7528\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<\/blockquote>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e00\u3001GZIP\u538b\u7f29\u77e5\u8bc6\u7b80\u4ecb<\/h1>\n\n\n\n<p>GZIP \u662f\u4e00\u79cd\u6570\u636e\u538b\u7f29\u683c\u5f0f\uff0c\u53ea\u80fd\u7528\u4e8e\u538b\u7f29\u5355\u4e2a\u6587\u4ef6\u3002\u5b83\u53ef\u7528\u4e8e\u7f51\u7edc\u6587\u4ef6\u4f20\u8f93\u65f6\u7684\u538b\u7f29\uff0c\u4f8b\u5982 nginx \u4e2d\u7684&nbsp;<code>ngx_http_gzip_module<\/code>\uff0c\u542f\u7528\u538b\u7f29\u529f\u80fd\u540e\u53ef\u4ee5\u8282\u7ea6\u5e26\u5bbd\uff1b\u4e5f\u53ef\u7528\u4e8e\u672c\u5730\u6587\u4ef6\u5b58\u50a8\u65f6\u7684\u538b\u7f29\u3002\u672c\u8282\u5c06\u91cd\u70b9\u5bf9Gzip\u8fdb\u884c\u4e00\u4e2a\u7b80\u5355\u7684\u4ecb\u7ecd\uff0c\u8ba9\u5927\u5bb6\u5bf9Gzip\u7684\u76f8\u5173\u77e5\u8bc6\u6709\u4e00\u4e2a\u7b80\u5355\u7684\u4e86\u89e3\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1\u3001\u4ec0\u4e48\u662fGzip<\/h3>\n\n\n\n<p>Gzip \u7684\u538b\u7f29\u7b97\u6cd5\u57fa\u4e8e LZ77 \u7b97\u6cd5 \u548c Huffman \u7f16\u7801 \u7684\u7ed3\u5408\u3002\u5177\u4f53\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2022\u00a0<strong>LZ77 \u7b97\u6cd5\uff1a<\/strong>\u00a0LZ77 \u7b97\u6cd5\u901a\u8fc7\u67e5\u627e\u548c\u66ff\u6362\u91cd\u590d\u7684\u5b57\u8282\u5e8f\u5217\u6765\u538b\u7f29\u6570\u636e\u3002\u5b83\u7ef4\u62a4\u4e00\u4e2a\u6ed1\u52a8\u7a97\u53e3\uff0c\u5728\u7a97\u53e3\u5185\u67e5\u627e\u5339\u914d\u7684\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u4f7f\u7528\u6307\u9488\u6765\u66ff\u4ee3\u8fd9\u4e9b\u91cd\u590d\u7684\u5b57\u7b26\u4e32\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u5b57\u7b26\u4e32 \"<code>http:\/\/jiurl.yeah.nethttp:\/\/jiurl.nease.net<\/code>\"\uff0cLZ77 \u7b97\u6cd5\u4f1a\u5c06\u5176\u538b\u7f29\u4e3a \"<code>http:\/\/jiurl.yeah.net(22,13)nease(23,4)<\/code>\"\uff0c\u5176\u4e2d (22,13) \u8868\u793a\u8ddd\u79bb\u5f53\u524d\u4f4d\u7f6e 22 \u4e2a\u5b57\u7b26\u5904\u7684 13 \u4e2a\u5b57\u7b26\u4e0e\u5f53\u524d\u4f4d\u7f6e\u7684\u5b57\u7b26\u76f8\u540c\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>Huffman \u7f16\u7801\uff1a<\/strong>\u00a0Huffman \u7f16\u7801\u662f\u4e00\u79cd\u57fa\u4e8e\u5b57\u7b26\u9891\u7387\u7684\u7f16\u7801\u65b9\u6cd5\u3002\u5b83\u4e3a\u51fa\u73b0\u9891\u7387\u9ad8\u7684\u5b57\u7b26\u5206\u914d\u8f83\u77ed\u7684\u7f16\u7801\uff0c\u4e3a\u51fa\u73b0\u9891\u7387\u4f4e\u7684\u5b57\u7b26\u5206\u914d\u8f83\u957f\u7684\u7f16\u7801\uff0c\u4ece\u800c\u8fbe\u5230\u538b\u7f29\u7684\u76ee\u7684\u3002\u5728 Gzip \u4e2d\uff0cLZ77 \u7b97\u6cd5\u7684\u8f93\u51fa\u7ed3\u679c\u4f1a\u8fdb\u4e00\u6b65\u901a\u8fc7 Huffman \u7f16\u7801\u8fdb\u884c\u538b\u7f29\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>Gzip \u6587\u4ef6\u7ed3\u6784\uff1a<\/strong>\u00a0Gzip \u6587\u4ef6\u5305\u542b\u6587\u4ef6\u5934\u3001\u538b\u7f29\u6570\u636e\u5757\u548c\u6587\u4ef6\u5c3e\u3002\u6587\u4ef6\u5934\u5b58\u50a8\u6587\u4ef6\u7684\u5143\u6570\u636e\uff0c\u5982\u538b\u7f29\u65b9\u6cd5\u3001\u65f6\u95f4\u6233\u7b49\uff1b\u538b\u7f29\u6570\u636e\u5757\u662f\u4f7f\u7528 DEFLATE \u7b97\u6cd5\u538b\u7f29\u540e\u7684\u6570\u636e\uff1b\u6587\u4ef6\u5c3e\u5b58\u50a8\u6821\u9a8c\u548c\uff08CRC32\uff09\u548c\u539f\u59cb\u6587\u4ef6\u5927\u5c0f\uff0c\u4ee5\u786e\u4fdd\u6587\u4ef6\u7684\u5b8c\u6574\u6027<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2\u3001Gzip\u7279\u70b9<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2022\u00a0<strong>\u65e0\u635f\u538b\u7f29\uff1a<\/strong>\u00a0Gzip \u662f\u4e00\u79cd\u65e0\u635f\u538b\u7f29\u7b97\u6cd5\uff0c\u6570\u636e\u5728\u89e3\u538b\u7f29\u540e\u53ef\u4ee5\u5b8c\u5168\u8fd8\u539f\uff0c\u6ca1\u6709\u4efb\u4f55\u635f\u5931\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u9ad8\u6548\u7684\u538b\u7f29\u7387\uff1a<\/strong>\u00a0\u5bf9\u4e8e\u6587\u672c\u6587\u4ef6\uff08\u5982 HTML\u3001JSON\u3001XML\uff09\uff0cGzip \u7684\u538b\u7f29\u7387\u901a\u5e38\u5728 50%-90% \u4e4b\u95f4\u3002\u5b83\u901a\u8fc7\u67e5\u627e\u91cd\u590d\u7684\u5b57\u7b26\u4e32\u5e76\u7528\u8f83\u77ed\u7684\u6307\u9488\u66ff\u4ee3\uff0c\u4ee5\u53ca\u6839\u636e\u5b57\u7b26\u9891\u7387\u8fdb\u884c\u7f16\u7801\uff0c\u4ece\u800c\u5b9e\u73b0\u9ad8\u6548\u538b\u7f29\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u5e7f\u6cdb\u652f\u6301\uff1a<\/strong>\u00a0Gzip \u88ab\u51e0\u4e4e\u6240\u6709\u73b0\u4ee3\u6d4f\u89c8\u5668\u3001\u670d\u52a1\u5668\u548c\u7f16\u7a0b\u8bed\u8a00\u652f\u6301\u3002\u5728 HTTP \u4f20\u8f93\u4e2d\uff0c\u670d\u52a1\u5668\u53ef\u4ee5\u6839\u636e\u6d4f\u89c8\u5668\u7684\u8bf7\u6c42\u5934\uff08\u5982\u00a0<code>Accept-Encoding: gzip<\/code>\uff09\u6765\u5224\u65ad\u662f\u5426\u4f7f\u7528 Gzip \u538b\u7f29\u54cd\u5e94\u5185\u5bb9\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u538b\u7f29\u548c\u89e3\u538b\u901f\u5ea6\u8f83\u5feb\uff1a<\/strong>\u00a0Gzip \u7684\u538b\u7f29\u548c\u89e3\u538b\u901f\u5ea6\u76f8\u5bf9\u8f83\u5feb\uff0c\u5c24\u5176\u662f\u89e3\u538b\u8fc7\u7a0b\uff0c\u56e0\u4e3a\u89e3\u538b\u65f6\u53ea\u9700\u6839\u636e\u6307\u9488\u548c\u7f16\u7801\u8fd8\u539f\u6570\u636e\uff0c\u8ba1\u7b97\u91cf\u76f8\u5bf9\u8f83\u5c0f\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u9002\u7528\u4e8e\u7279\u5b9a\u6587\u4ef6\u7c7b\u578b\uff1a<\/strong>\u00a0Gzip \u5bf9\u6587\u672c\u6587\u4ef6\u7684\u538b\u7f29\u6548\u679c\u8f83\u597d\uff0c\u4f46\u5bf9\u4e8e\u5df2\u7ecf\u538b\u7f29\u8fc7\u7684\u6587\u4ef6\uff08\u5982\u56fe\u7247\u3001\u97f3\u4e50\u3001\u89c6\u9891\uff09\u6548\u679c\u4e0d\u660e\u663e\uff0c\u751a\u81f3\u53ef\u80fd\u5bfc\u81f4\u6587\u4ef6\u53d8\u5927<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3\u3001Gzip\u5728GIS\u65b9\u9762\u7684\u5e94\u7528<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2022\u00a0<strong>\u5730\u7406\u6570\u636e\u4f20\u8f93\uff1a<\/strong>\u00a0\u5728 GIS \u5e94\u7528\u4e2d\uff0c\u5730\u7406\u6570\u636e\uff08\u5982 GeoJSON \u6587\u4ef6\uff09\u901a\u5e38\u5305\u542b\u5927\u91cf\u7684\u5750\u6807\u70b9\u548c\u51e0\u4f55\u5f62\u72b6\u4fe1\u606f\uff0c\u6570\u636e\u91cf\u8f83\u5927\u3002\u4f7f\u7528 Gzip \u538b\u7f29\u53ef\u4ee5\u663e\u8457\u51cf\u5c11\u6570\u636e\u4f20\u8f93\u7684\u4f53\u79ef\uff0c\u52a0\u5feb\u5730\u56fe\u52a0\u8f7d\u901f\u5ea6\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u670d\u52a1\u5668\u7aef\u4f18\u5316\uff1a<\/strong>\u00a0\u5728\u670d\u52a1\u5668\u7aef\uff0c\u53ef\u4ee5\u914d\u7f6e Web \u670d\u52a1\u5668\uff08\u5982 Nginx\uff09\u5f00\u542f Gzip \u538b\u7f29\u529f\u80fd\u3002\u5f53\u5ba2\u6237\u7aef\u8bf7\u6c42\u5730\u7406\u6570\u636e\u65f6\uff0c\u670d\u52a1\u5668\u4f1a\u81ea\u52a8\u5bf9\u54cd\u5e94\u5185\u5bb9\u8fdb\u884c\u538b\u7f29\uff0c\u51cf\u5c11\u7f51\u7edc\u5e26\u5bbd\u7684\u5360\u7528\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u524d\u7aef\u6027\u80fd\u4f18\u5316\uff1a<\/strong>\u00a0\u5728\u524d\u7aef\u5f00\u53d1\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5de5\u5177\uff08\u5982 Webpack \u7684\u00a0<code>Compression-webpack-plugin<\/code>\u00a0\u63d2\u4ef6\uff09\u5728\u6784\u5efa\u8fc7\u7a0b\u4e2d\u5bf9\u5730\u7406\u6570\u636e\u6587\u4ef6\u8fdb\u884c Gzip \u538b\u7f29\uff0c\u7136\u540e\u5728\u670d\u52a1\u5668\u4e0a\u76f4\u63a5\u63d0\u4f9b\u538b\u7f29\u540e\u7684\u6587\u4ef6\uff0c\u51cf\u5c11\u670d\u52a1\u5668\u7684\u5b9e\u65f6\u538b\u7f29\u8d1f\u8f7d\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u6570\u636e\u5b58\u50a8\u4f18\u5316\uff1a<\/strong>\u00a0\u5bf9\u4e8e\u5b58\u50a8\u5728\u670d\u52a1\u5668\u4e0a\u7684\u5730\u7406\u6570\u636e\u6587\u4ef6\uff0c\u4f7f\u7528 Gzip \u538b\u7f29\u53ef\u4ee5\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\u3002\u5728\u9700\u8981\u8bfb\u53d6\u6570\u636e\u65f6\uff0c\u518d\u8fdb\u884c\u89e3\u538b\u5904\u7406\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u603b\u4e4b\uff0cGzip \u538b\u7f29\u6280\u672f\u5728 GIS \u9886\u57df\u7684\u5e94\u7528\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u6548\u7387\uff0c\u8fd8\u53ef\u4ee5\u4f18\u5316\u670d\u52a1\u5668\u6027\u80fd\u548c\u5b58\u50a8\u7a7a\u95f4\uff0c\u662f\u63d0\u5347 GIS \u5e94\u7528\u6027\u80fd\u7684\u91cd\u8981\u624b\u6bb5\u4e4b\u4e00\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u3001SpringBoot\u4e2d\u5f00\u542fGzip\u7684\u65b9\u5f0f<\/h1>\n\n\n\n<p>SpringBoot \u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684 Java \u57fa\u4e8e Spring \u6846\u67b6\u7684\u5feb\u901f\u5f00\u53d1\u6846\u67b6\uff0c\u5b83\u6781\u5927\u5730\u7b80\u5316\u4e86 Spring \u5e94\u7528\u7684\u5f00\u53d1\u8fc7\u7a0b\u3002\u5728 SpringBoot \u5e94\u7528\u4e2d\uff0c\u901a\u8fc7\u5408\u7406\u7684\u914d\u7f6e\u548c\u7f16\u7a0b\uff0c\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u96c6\u6210 Gzip \u538b\u7f29\u529f\u80fd\uff0c\u4ece\u800c\u5b9e\u73b0\u5bf9\u54cd\u5e94\u6570\u636e\u7684\u81ea\u52a8\u538b\u7f29\u3002\u8fd9\u4e0d\u4ec5\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u6548\u7387\uff0c\u8fd8\u53ef\u4ee5\u51cf\u8f7b\u670d\u52a1\u5668\u7684\u8d1f\u8f7d\uff0c\u63d0\u5347\u6574\u4e2a\u5e94\u7528\u7684\u6027\u80fd\u3002<\/p>\n\n\n\n<p>\u672c\u8282\u5c06\u91cd\u70b9\u4ecb\u7ecd\u5728SpringBoot\u4e2d\u5173\u4e8eGzip\u7684\u76f8\u5173\u77e5\u8bc6\u4ee5\u53ca\u5728SpringBoot\u4e2dGeoJSON\u7684\u4e00\u4e9b\u5b9e\u8df5\u6848\u4f8b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1\u3001\u5728SpringBoot\u4e2d\u5f00\u542fGzip\u7684\u77e5\u8bc6\u7b80\u4ecb<\/h3>\n\n\n\n<p>\u5728 SpringBoot \u4e2d\uff0c\u5f00\u542f Gzip \u538b\u7f29\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a\u4e00\u79cd\u662f\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u5168\u5c40\u914d\u7f6e\uff0c\u53e6\u4e00\u79cd\u662f\u901a\u8fc7\u7f16\u7a0b\u7684\u65b9\u5f0f\u5728\u7279\u5b9a\u7684\u63a7\u5236\u5668\u6216\u65b9\u6cd5\u4e0a\u8fdb\u884c\u5c40\u90e8\u914d\u7f6e\u3002\u8fd9\u4e24\u79cd\u65b9\u5f0f\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2022\u00a0<strong>\u5168\u5c40\u914d\u7f6e\u65b9\u5f0f \uff1a<\/strong>\u00a0\u901a\u8fc7\u5728 SpringBoot \u7684\u914d\u7f6e\u6587\u4ef6\uff08\u5982\u00a0<code>application.yml<\/code>\u00a0\u6216\u00a0<code>application.properties<\/code>\uff09\u4e2d\u6dfb\u52a0\u76f8\u5173\u7684 Gzip \u538b\u7f29\u914d\u7f6e\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u6574\u4e2a\u5e94\u7528\u7684 HTTP \u54cd\u5e94\u8fdb\u884c\u7edf\u4e00\u7684\u538b\u7f29\u5904\u7406\u3002\u8fd9\u79cd\u65b9\u5f0f\u7b80\u5355\u65b9\u4fbf\uff0c\u9002\u7528\u4e8e\u5927\u591a\u6570\u9700\u8981\u538b\u7f29\u7684\u573a\u666f\uff0c\u4f46\u7f3a\u4e4f\u5bf9\u7279\u5b9a\u6570\u636e\u7c7b\u578b\u7684\u9488\u5bf9\u6027\u5904\u7406\u3002<\/li>\n\n\n\n<li>\u2022\u00a0<strong>\u5c40\u90e8\u914d\u7f6e\u65b9\u5f0f \uff1a<\/strong>\u00a0\u901a\u8fc7\u5728\u63a7\u5236\u5668\u6216\u65b9\u6cd5\u4e0a\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7684\u6ce8\u89e3\u6216\u903b\u8f91\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u7279\u5b9a\u6570\u636e\u7c7b\u578b\u7684\u538b\u7f29\u5904\u7406\u3002\u8fd9\u79cd\u65b9\u5f0f\u66f4\u52a0\u7075\u6d3b\uff0c\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b\u548c\u4e1a\u52a1\u9700\u6c42\uff0c\u5b9a\u5236\u4e0d\u540c\u7684\u538b\u7f29\u7b56\u7565\uff0c\u4f46\u76f8\u5bf9\u6765\u8bf4\u5b9e\u73b0\u8d77\u6765\u8f83\u4e3a\u590d\u6742\uff0c\u9700\u8981\u66f4\u591a\u7684\u7f16\u7a0b\u5de5\u4f5c\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u91cc\u9996\u5148\u7b80\u5355\u4ecb\u7ecd\u4e86\u4e24\u79cd\u5728SpringBoot\u4e2d\u5f00\u542fGzip\u538b\u7f29\u7684\u65b9\u5f0f\uff0c\u4e3a\u4e0b\u6587\u5168\u9762\u8bb2\u89e3\u8fd9\u4e24\u79cd\u65b9\u5f0f\u505a\u51c6\u5907\uff0c\u5148\u8ba9\u5927\u5bb6\u4e86\u89e3\u76f8\u5173\u77e5\u8bc6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2\u3001SpringBoot\u4e2dGeoJSON\u7684\u5b9e\u4f8b<\/h3>\n\n\n\n<p>GeoJSON\u5728WebGIS\u4e2d\u7684\u7528\u5904\u5f88\u591a\uff0c\u5f88\u591a\u77e2\u91cf\u6570\u636e\u7684\u8fb9\u754c\uff0c\u8303\u56f4\u70b9\u7b49\u6570\u636e\uff0c\u6211\u4eec\u90fd\u662f\u76f4\u63a5\u4ee5GeoJSON\u7684\u683c\u5f0f\u8fd4\u56de\u7ed9\u524d\u7aef\uff0c\u5e76\u76f4\u63a5\u8fdb\u884c\u5c55\u793a\u7684\u3002\u6bd4\u5982\u4e4b\u524d\u5f88\u591a\u7684\u884c\u653f\u533a\u5212\u5c55\u793a\uff0c\u7701\u5e02\u53bf\u7b49\u4e0d\u540c\u7684\u884c\u653f\u533a\u5212\u8303\u56f4\u5c55\u793a\u7b49\uff0c\u6211\u4eec\u7684\u5b9e\u73b0\u8fc7\u7a0b\u90fd\u662f\u5728\u540e\u53f0\u7684Controller\u5c42\u4e2d\u8fd4\u56de\u4e00\u4e2a\u5305\u542bGeoJSON\u7684\u5bf9\u8c61\uff0c\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package&nbsp;com.yelang.project.meteorology.domain;<br>import&nbsp;java.io.Serializable;<br>import&nbsp;com.baomidou.mybatisplus.annotation.TableField;<br>import&nbsp;lombok.Data;<br>import&nbsp;lombok.EqualsAndHashCode;<br>import&nbsp;lombok.ToString;<br>@Data<br>@ToString(callSuper=true)\/\/callSuper=true\u8868\u793a\u8f93\u51fa\u7236\u7c7b\u5c5e\u6027<br>@EqualsAndHashCode(callSuper=false)<br>public&nbsp;class&nbsp;AreaWeatherVO&nbsp;extends&nbsp;WeatherNow&nbsp;implements&nbsp;Serializable{<br>&nbsp; &nbsp; private&nbsp;static&nbsp;final<em>&nbsp;long<\/em>&nbsp;serialVersionUID&nbsp;=&nbsp;-7559774548761847068L;<br>&nbsp; &nbsp; @TableField(exist = false,value= \"province_code\")<br>&nbsp; &nbsp; private&nbsp;String provinceCode;<br>&nbsp; &nbsp; @TableField(exist = false,value= \"province_name\")<br>&nbsp; &nbsp; private&nbsp;String provinceName;<br>&nbsp; &nbsp; @TableField(exist = false,value= \"city_code\")<br>&nbsp; &nbsp; private&nbsp;String cityCode;<br>&nbsp; &nbsp; @TableField(exist = false,value= \"city_name\")<br>&nbsp; &nbsp; private&nbsp;String cityName;<br>&nbsp; &nbsp; @TableField(exist = false,value= \"area_name\")<br>&nbsp; &nbsp; private&nbsp;String areaName;<br>&nbsp; &nbsp; @TableField(exist = false)<br>&nbsp; &nbsp; private&nbsp;String geomJson;<br>&nbsp; &nbsp; private&nbsp;String lat;<br>&nbsp; &nbsp; private&nbsp;String lon;<br>}<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u662f\u4e00\u4e2a\u89c6\u56fe\u5bf9\u8c61\u7684\u5177\u4f53\u4ee3\u7801\uff0c\u5728Controller\u7684\u65b9\u6cd5\u4e2d\u6211\u4eec\u8c03\u7528\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@RequiresPermissions(\"met:province:weather:list\")<br>@GetMapping(\"\/list\/{pcode}\")<br>@ResponseBody<br>public&nbsp;AjaxResult&nbsp;ewsnProvinceList(@PathVariable(\"pcode\")&nbsp;String pcode){<em><br>&nbsp; &nbsp; String<\/em>&nbsp;day&nbsp;=&nbsp;\"2025-08-17\";<br>&nbsp; &nbsp; List&lt;AreaWeatherVO&gt; dataList = weatherNowService.getWeatherByProvinceAndday(pcode,day);<br>&nbsp; &nbsp; return&nbsp;AjaxResult.success().put(\"data\", dataList);<br>&nbsp;}<\/code><\/pre>\n\n\n\n<p>\u7ecf\u8fc7\u4ee5\u4e0a\u7684\u4ee3\u7801\u8f93\u51fa\u63a5\u53e3\u4e2d\u5c31\u5305\u542bGeoJOSN\u6570\u636e\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-1024x469.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-6648 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-1024x469.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-768x352.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-1024x469.png\" alt=\"\" class=\"wp-image-6648\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-1024x469.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-768x352.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<p>\u5176\u5177\u4f53\u7684geoJSON\u503c\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"472\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-1024x472.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-6649 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-1024x472.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-768x354.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"472\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-1024x472.png\" alt=\"\" class=\"wp-image-6649\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-1024x472.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-768x354.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<p>\u5728\u7f51\u7edc\u7a97\u53e3\u4e2d\u53ef\u4ee5\u770b\u5230\u6574\u4e2a\u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636e\u5927\u5c0f\u5927\u7ea6\u4e3a5MB\uff0c\u5982\u679c\u9047\u5230\u66f4\u5927\u8303\u56f4\u7684\u884c\u653f\u533a\u5212\uff0c\u8fd4\u56de\u7684\u6570\u636e\u80af\u5b9a\u4f1a\u5927\uff0c\u6bd4\u5982\u897f\u85cf\u7684\u884c\u653f\u533a\u5212\u5927\u7ea6\u670914MB\uff0c\u5982\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"472\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-1024x472.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-6650 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-1024x472.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-768x354.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"472\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-1024x472.png\" alt=\"\" class=\"wp-image-6650\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-1024x472.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-768x354.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<p>\u90a3\u4e48\u5982\u4f55\u901a\u8fc7\u5f00\u542fGzip\u6765\u51cf\u5c11\u8fd9\u4e9b\u6570\u636e\u7684\u8f93\u51fa\u5462\uff1f\u4e0b\u9762\u4e24\u4e2a\u90e8\u5206\u6765\u91cd\u70b9\u8bb2\u89e3\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u3001\u5168\u5c40\u5f00\u542fGzip\u5b9e\u73b0<\/h1>\n\n\n\n<p>\u672c\u8282\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728SpringBoot\u4e2d\u5f00\u542fGzip\u538b\u7f29\u7684\u914d\u7f6e\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1\u3001\u5b9e\u73b0\u539f\u7406<\/h3>\n\n\n\n<p>\u5728&nbsp;<code>application.yml<\/code>&nbsp;\u6216&nbsp;<code>application.properties<\/code>&nbsp;\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff1a<\/p>\n\n\n\n<p>\u793a\u4f8b\uff1a<code>application.yml<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server:<br>&nbsp; compression:<br>&nbsp; &nbsp; enabled:&nbsp;true<br>&nbsp; &nbsp; mime-types:&nbsp;application\/json<br>&nbsp; &nbsp; min-response-size:&nbsp;1KB&nbsp; # \u5c0f\u4e8e1KB\u7684\u54cd\u5e94\u4e0d\u538b\u7f29<\/code><\/pre>\n\n\n\n<p>\u6216\u8005<code>application.properties<\/code>\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server.compression.enabled=true<br>server.compression.mime-types=application\/json<br>server.compression.min-response-size=1024<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8bf7\u6ce8\u610f\uff1a\u8be5\u914d\u7f6e\u4f1a\u5bf9\u6240\u6709\u8fd4\u56de&nbsp;<code>application\/json<\/code>&nbsp;\u7684\u63a5\u53e3\u542f\u7528 GZIP \u538b\u7f29\u3002<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">2\u3001\u5b9e\u73b0\u6548\u679c<\/h3>\n\n\n\n<p>\u5728\u6211\u4eec\u7684\u5de5\u7a0b\u4e2d\u914d\u7f6e\u6587\u4ef6\u662f\u4ee5yml\u7684\u5f62\u5f0f\u914d\u7f6e\u7684\uff0c\u6309\u7167\u4e0a\u9762\u7684\u6b65\u9aa4\u8fdb\u884c\u8bbe\u7f6e\u540e\uff0c\u91cd\u65b0\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u540e\u6765\u770b\u4e00\u4e0b\u540c\u6837\u7684\u63a5\u53e3\uff0c\u5176\u8fd4\u56de\u7684\u6570\u636e\u91cf\u5927\u5c0f\u662f\u591a\u5c11\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"470\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-1024x470.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-6651 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-1024x470.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-768x353.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"470\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-1024x470.png\" alt=\"\" class=\"wp-image-6651\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-1024x470.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-300x138.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-768x353.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0a\u56fe\u7247\u53ef\u4ee5\u76f4\u89c2\u7684\u770b\u5230\uff0c\u5f00\u542f\u5168\u5c40\u538b\u7f29\u540e\uff0c\u6211\u4eec\u7684\u63a5\u53e3\u8fd4\u56de\u5927\u5c0f\uff0c\u4ece14.4M\u4e0b\u964d\u4e865MB\uff0c\u51e0\u4e4e\u662f\u539f\u6765\u76841\/3\uff0c\u8fd9\u4e2a\u538b\u7f29\u6bd4\u4f8b\u8fd8\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u3001\u5c40\u90e8\u7ea6\u5b9a\u914d\u7f6e<\/h1>\n\n\n\n<p>\u4e0a\u9762\u7684\u8fd9\u79cd\u5b9e\u73b0\u65b9\u5f0f\u5168\u5c40\u7684\u5f00\u542f\uff0c\u4e5f\u5c31\u662f\u6240\u6709\u7684\u63a5\u53e3\u90fd\u4f1a\u5f00\u542f\uff0c\u867d\u7136\u53ef\u4ee5\u8bbe\u7f6e<code>mime-types<\/code>\u6765\u8fdb\u884c\u4e00\u5b9a\u7684\u8fc7\u6ee4\uff0c\u4f46\u662f\u4f9d\u7136\u4f1a\u6709\u5f88\u5927\u7684\u8986\u76d6\u9762\u3002\u5982\u679c\u53ea\u60f3\u5bf9\u67d0\u4e2a\u63a5\u53e3\u751f\u6548\u6216\u8005\u6307\u5b9a\u4e00\u4e9b\u63a5\u53e3\u751f\u6548\u53c8\u5e94\u8be5\u600e\u4e48\u5b9e\u73b0\u5462\uff1f\u672c\u8282\u6765\u8bb2\u8bb2\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\u7684\u5b9e\u73b0\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1\u3001\u5b9e\u73b0\u539f\u7406<\/h3>\n\n\n\n<p>\u57fa\u4e8e\u5c40\u90e8\u7ea6\u5b9a\u914d\u7f6e\u7684\u65b9\u5f0f\u7684\u5b9e\u73b0\u539f\u7406\u5176\u5b9e\u662f\u901a\u8fc7\u81ea\u5b9a\u4e49 Filter \u6765\u7cbe\u786e\u63a7\u5236\u54ea\u4e9b\u63a5\u53e3\u542f\u7528\u538b\u7f29\uff0c\u56e0\u6b64\u901a\u8fc7\u8fc7\u6ee4\u5668\u5c31\u53ef\u4ee5\u5c06\u6211\u4eec\u9700\u8981\u8bbe\u5b9a\u7684\u8bf7\u6c42\u8def\u5f84\u8fdb\u884c\u9488\u5bf9\u6027\u8fc7\u6ee4\uff0c\u4ece\u800c\u5f00\u542f\u9488\u5bf9\u8fd9\u4e9b\u63a5\u53e3\u7684Gzip\u8fc7\u6ee4\u538b\u7f29\u3002\u4e0b\u9762\u6211\u4eec\u6765\u770b\u770b\u5728SpringBoot\u4e2d\u5982\u4f55\u5b9e\u73b0\u5462\uff1f<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2\u3001\u5177\u4f53\u4ee3\u7801\u5b9e\u73b0<\/h3>\n\n\n\n<p>\u9996\u5148\u5728SpringBoot\u4e2d\u76f4\u63a5\u521b\u5efa\u4e00\u4e2a\u8fc7\u6ee4\u5668Filter\uff0c\u5173\u952e\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package&nbsp;com.yelang.framework.interceptor.gzip;<br>import&nbsp;org.springframework.stereotype.Component;<br>import&nbsp;org.springframework.util.AntPathMatcher;<br>import&nbsp;java.io.IOException;<br>import&nbsp;java.util.Arrays;<br>import&nbsp;java.util.List;<br>import&nbsp;java.util.zip.GZIPOutputStream;<br>import&nbsp;javax.servlet.Filter;<br>import&nbsp;javax.servlet.FilterChain;<br>import&nbsp;javax.servlet.ServletException;<br>import&nbsp;javax.servlet.ServletOutputStream;<br>import&nbsp;javax.servlet.ServletRequest;<br>import&nbsp;javax.servlet.ServletResponse;<br>import&nbsp;javax.servlet.WriteListener;<br>import&nbsp;javax.servlet.http.HttpServletRequest;<br>import&nbsp;javax.servlet.http.HttpServletResponse;<br>import&nbsp;javax.servlet.http.HttpServletResponseWrapper;<br>@Component<br>public&nbsp;class&nbsp;SelectiveGzipFilter&nbsp;implements&nbsp;Filter&nbsp;{<br>&nbsp;<br>&nbsp; &nbsp; private&nbsp;final<em>&nbsp;AntPathMatcher<\/em>&nbsp;pathMatcher&nbsp;=&nbsp;new&nbsp;AntPathMatcher();<br>&nbsp; &nbsp; private&nbsp;final&nbsp;List&lt;String&gt; gzipPatterns = Arrays.asList(<br>&nbsp; &nbsp; &nbsp; &nbsp; \"\/eq\/province\/geojson\/**\",<br>&nbsp; &nbsp; &nbsp; &nbsp; \"\/eq\/province\/detourcoefficient\/list\/**\",<br>&nbsp; &nbsp; &nbsp; &nbsp; \"\/eq\/info\/home\/earthinfo\",<br>&nbsp; &nbsp; &nbsp; &nbsp; \"\/eq\/province\/abbreviations\/list\"<br>&nbsp; &nbsp; );<br>&nbsp;<br>&nbsp; &nbsp; @Override<br>&nbsp; &nbsp; public&nbsp;void&nbsp;doFilter(ServletRequest request, ServletResponse response, FilterChain chain)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throws&nbsp;IOException, ServletException {<em><br>&nbsp; &nbsp; &nbsp; &nbsp; HttpServletRequest<\/em>&nbsp;req&nbsp;=&nbsp;(HttpServletRequest) request;<em><br>&nbsp; &nbsp; &nbsp; &nbsp; String<\/em>&nbsp;requestUri&nbsp;=&nbsp;req.getRequestURI();<em><br>&nbsp; &nbsp; &nbsp; &nbsp; String<\/em>&nbsp;contextPath&nbsp;=&nbsp;req.getContextPath();<em><br>&nbsp; &nbsp; &nbsp; &nbsp; boolean<\/em>&nbsp;match&nbsp;=&nbsp;gzipPatterns.stream()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .anyMatch(pattern -&gt; pathMatcher.match(pattern, requestUri));<br>&nbsp; &nbsp; &nbsp; &nbsp; if&nbsp;(match) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(\"\u6210\u529f\u5339\u914d\");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u542f\u7528 GZIP \u538b\u7f29\u903b\u8f91\uff08\u540c\u4e0a\uff09<em><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HttpServletResponse<\/em>&nbsp;res&nbsp;=&nbsp;(HttpServletResponse) response;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res.setHeader(\"Content-Encoding\",&nbsp;\"gzip\");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res.setHeader(\"Content-Type\",&nbsp;\"application\/json\");<em><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GZIPResponseWrapper<\/em>&nbsp;gzipResponse&nbsp;=&nbsp;new&nbsp;GZIPResponseWrapper(res);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; chain.doFilter(request, gzipResponse);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gzipResponse.finish();<br>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;else&nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(\"\u672a\u5339\u914d\u4e0a...\");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; chain.doFilter(request, response);<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp;<br>&nbsp; &nbsp; static&nbsp;class&nbsp;GZIPResponseWrapper&nbsp;extends&nbsp;HttpServletResponseWrapper&nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; private&nbsp;final&nbsp;GZIPOutputStream gzipOutputStream;<br>&nbsp; &nbsp; &nbsp; &nbsp; public&nbsp;GZIPResponseWrapper(HttpServletResponse response)&nbsp;throws&nbsp;IOException {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; super(response);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gzipOutputStream =&nbsp;new&nbsp;GZIPOutputStream(response.getOutputStream());<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; @Override<br>&nbsp; &nbsp; &nbsp; &nbsp; public&nbsp;ServletOutputStream&nbsp;getOutputStream()&nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return&nbsp;new&nbsp;ServletOutputStream() {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public&nbsp;void&nbsp;write(<em>int<\/em>&nbsp;b)&nbsp;throws&nbsp;IOException {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gzipOutputStream.write(b);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public<em>&nbsp;boolean<\/em>&nbsp;isReady()&nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return&nbsp;true;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public&nbsp;void&nbsp;setWriteListener(WriteListener writeListener)&nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw&nbsp;new&nbsp;UnsupportedOperationException();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; public&nbsp;void&nbsp;finish()&nbsp;throws&nbsp;IOException {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gzipOutputStream.finish();<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>}<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\u6f14\u793a\u4e86\u5982\u4f55\u8bbe\u7f6e\u591a\u4e2a\u76ee\u6807URL\u5730\u5740\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u4f7f\u7528<code>AntPathMatcher&nbsp;<\/code>\u6765\u8fdb\u884c\u5339\u914d\u5b9e\u73b0\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u91cc\u6211\u4eec\u6ca1\u6709\u533a\u5206\u8bf7\u6c42\u7684\u5934\u5730\u5740\uff0c\u4ee5\u82e5\u4f9d\u4e3a\u4f8b\uff0c\u53ef\u80fd\u4f1a\u5728\u5339\u914d\u65f6\u65e0\u6cd5\u6b63\u786e\u5bf9\u5e94\uff0c\u5bfc\u81f4\u65e0\u6cd5\u6b63\u5e38\u7684\u5f00\u542fGzip\u538b\u7f29\uff0c\u56e0\u6b64\u4e3a\u4e86\u4fdd\u8bc1\u6b63\u786e\u7684\u542f\u7528\uff0c\u6211\u4eec\u5728\u8fdb\u884c\u5730\u5740\u5339\u914d\u65f6\uff0c\u9700\u8981\u81ea\u52a8\u8fc7\u6ee4\u9879\u76ee\u7684\u670d\u52a1\u540d\u79f0\uff0c\u8be6\u7ec6\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>String<\/em>&nbsp;contextPath&nbsp;=&nbsp;req.getContextPath();<br>\/\/ \u53bb\u6389 context-path \u90e8\u5206\uff0c\u53ea\u5339\u914d\u76f8\u5bf9\u8def\u5f84<em><br>String<\/em>&nbsp;relativePath&nbsp;=&nbsp;requestUri.substring(contextPath.length());<br>System.out.println(\"relativePath==&gt;\"&nbsp;+ relativePath);<br>\/*boolean match = gzipPatterns.stream()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .anyMatch(pattern -&gt; pathMatcher.match(pattern, requestUri));*\/<em><br>boolean<\/em>&nbsp;match&nbsp;=&nbsp;gzipPatterns.stream()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .anyMatch(pattern -&gt; pathMatcher.match(pattern, relativePath));<\/code><\/pre>\n\n\n\n<p>\u5176\u5b9e\u8fd9\u91cc\u7684<code>contenxPath<\/code>\u5bf9\u5e94\u7684\u5c31\u662f\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u53c2\u6570\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5f00\u53d1\u73af\u5883\u914d\u7f6e<br>server:<br>&nbsp; # \u670d\u52a1\u5668\u7684HTTP\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a80<br>&nbsp; port:&nbsp;8080<br>&nbsp; servlet:<br>&nbsp; &nbsp; # \u5e94\u7528\u7684\u8bbf\u95ee\u8def\u5f84<br>&nbsp; &nbsp; context-path:&nbsp;\/earthqadmin<\/code><\/pre>\n\n\n\n<p>GeoJSON \u6570\u636e\u901a\u5e38\u4f53\u79ef\u8f83\u5927\uff0c\u538b\u7f29\u540e\u53ef\u663e\u8457\u51cf\u5c11\u4f20\u8f93\u65f6\u95f4\u3002\u4ee5\u4e0b\u662f\u5b9e\u6218\u5efa\u8bae\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"492\" height=\"216\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-6652 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336.png 492w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336-300x132.png 300w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"492\" height=\"216\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336.png\" alt=\"\" class=\"wp-image-6652\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336.png 492w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336-300x132.png 300w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/noscript><\/figure>\n\n\n\n<p>\u53ea\u6709\u52a0\u4e0a\u4ee5\u4e0a\u4ee3\u7801\u540e\u624d\u80fd\u5b9e\u73b0\u6b63\u786e\u5339\u914d\uff0c\u5728\u8bbf\u95ee\u5730\u5740\u88ab\u8bf7\u6c42\u662f\u8f93\u51fa\u5982\u4e0b\u4fe1\u606f\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-1024x476.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-6653 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-1024x476.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-300x139.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-768x357.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-1024x476.png\" alt=\"\" class=\"wp-image-6653\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-1024x476.png 1024w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-300x139.png 300w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-768x357.png 768w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\"><\/h1>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5728\u5f53\u4eca\u6570\u5b57\u5316\u65f6\u4ee3\uff0c\u968f\u7740\u4e92\u8054\u7f51\u5e94\u7528\u7684\u98de\u901f\u53d1\u5c55\uff0c\u6570\u636e\u4f20\u8f93\u7684\u6548\u7387\u548c\u6027\u80fd\u6210\u4e3a\u4e86\u81f3\u5173\u91cd\u8981\u7684\u95ee\u9898\u3002GeoJSON \u662f\u4e00\u79cd\u57fa\u4e8e JSON \u683c\u5f0f\u7684 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-6646","post","type-post","status-publish","format-standard","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658.png","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-1024x575.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042928658-1024x575.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-1024x469.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042938306-1024x469.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-1024x472.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042945636-1024x472.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-1024x472.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929042952918-1024x472.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-1024x470.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043000496-1024x470.png","id":"image9"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336.png","id":"image10"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043011336.png","id":"image11"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-1024x476.png","id":"image12"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2025\/09\/20250929043015887-1024x476.png","id":"image13"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2025-09-29","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":131,"next_post_id":6655,"next_post_title":"\u5206\u5e03\u5f0f\u7cfb\u7edf Token \u7eed\u671f\u8e29\u5751\u5b9e\u5f55\uff1a\u81ea\u52a8\u7eed\u671f + \u8bbe\u5907\u7ed1\u5b9a\u8fd9\u6837\u505a\u624d\u5b89\u5168","previous_post_id":6609,"previous_post_title":"SpringBoot \u63d2\u4ef6\u5316\u5f00\u53d1\u6a21\u5f0f\uff0c\u5f3a\u70c8\u63a8\u8350\uff01","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=6646"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6646\/revisions"}],"predecessor-version":[{"id":6654,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/6646\/revisions\/6654"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=6646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=6646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=6646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}