{"id":10006730,"date":"2022-10-25T15:59:35","date_gmt":"2022-10-25T07:59:35","guid":{"rendered":"https:\/\/ityet.com\/?p=10006730"},"modified":"2022-10-25T15:59:35","modified_gmt":"2022-10-25T07:59:35","slug":"springboot-%e4%b8%80%e8%a1%8c%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e6%96%87%e4%bb%b6%e4%b8%8a%e4%bc%a0-20%e4%b8%aa%e5%b9%b3%e5%8f%b0%ef%bc%81%e5%b0%91%e5%86%99%e4%bb%a3%e7%a0%81%e5%88%b0%e6%9e%81","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006730","title":{"rendered":"Springboot \u4e00\u884c\u4ee3\u7801\u5b9e\u73b0\u6587\u4ef6\u4e0a\u4f20 20\u4e2a\u5e73\u53f0\uff01\u5c11\u5199\u4ee3\u7801\u5230\u6781\u81f4"},"content":{"rendered":"<p><strong>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u5c0f\u5bcc~<\/strong><\/p>\n<p>\u53c8\u662f\u505a\u597d\u4eba\u597d\u4e8b\u7684\u4e00\u5929\uff0c\u6709\u4e2a\u5c0f\u53ef\u7231\u79c1\u4e0b\u95ee\u6211\u6709\u6ca1\u6709\u597d\u7528\u7684<code>springboot<\/code>\u6587\u4ef6\u4e0a\u4f20\u5de5\u5177\uff0c\u8fd9\u4e0d\u5de7\u4e86\u561b\uff0c\u6b63\u597d\u6211\u79c1\u85cf\u4e86\u4e00\u4e2a\u597d\u4e1c\u897f\uff0c\u987a\u4fbf\u7ed9\u5c0f\u4f19\u4f34\u4eec\u4e5f\u5206\u4eab\u4e00\u4e0b\uff0c<strong>demo<\/strong>\u5730\u5740\u653e\u5728\u6587\u672b\u4e86\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042682814\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6587\u4ef6\u4e0a\u4f20\u5728\u5e73\u5e38\u4e0d\u8fc7\u7684\u4e00\u4e2a\u529f\u80fd\uff0c\u505a\u540e\u7aef\u5f00\u53d1\u7684\u57fa\u672c\u90fd\u4f1a\u63a5\u89e6\u5230\uff0c\u867d\u7136\u4e0d\u96be\u53ef\u7740\u5b9e\u6709\u70b9\u7e41\u7410\u3002\u6570\u636e\u6d41\u7684\u5f00\u95ed\u3001\u8bfb\u53d6\u8fd8\u5bb9\u6613\u51fa\u9519\uff0c\u5c24\u5176\u662f\u5728\u5bf9\u63a5\u4e00\u4e9b<code>OSS<\/code>\u5bf9\u8c61\u5b58\u50a8\u5e73\u53f0\uff0c\u4e00\u4e2a\u5e73\u53f0\u4e00\u5806SDK\u4ee3\u7801\u770b\u8d77\u6765\u4e71\u7cdf\u7cdf\u7684\u3002<\/p>\n<p>\u4e0b\u8fb9\u7ed9\u6211\u5927\u5bb6\u63a8\u8350\u4e00\u4e2a\u5de5\u5177<code>Spring File Storage<\/code>\uff0c\u4e0a\u4f20\u6587\u4ef6\u53ea\u8981\u4e9b\u8bb8\u914d\u7f6e<strong>\u4e00\u884c\u4ee3\u7801<\/strong>\u641e\u5b9a\uff0c\u5f00\u53d1\u6548\u7387\u6760\u6760\u7684\uff0c\u4e00\u8d77\u770b\u770b\u662f\u4e0d\u662f\u6709\u8fd9\u4e48\u6d41\u6279\uff01<\/p>\n<blockquote><p>\u5b98\u7f51\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=esV5kFJgcSzFw8UrZYjtYg%3D%3D.xC2iEuETtwAqxez31%2BP0NLBBIvL%2Fi%2FWCMPh%2BU7g0myDkH%2FqzpO9p%2BiAY0qeECuWo\" rel=\"nofollow\">https:\/\/spring-file-storage.x&#8230;<\/a><\/p><\/blockquote>\n<p><code>Spring File Storage<\/code>\u5de5\u5177\u51e0\u4e4e\u6574\u5408\u4e86\u5e02\u9762\u4e0a\u6240\u6709\u7684OSS\u5bf9\u8c61\u5b58\u50a8\u5e73\u53f0\uff0c\u5305\u62ec<code>\u672c\u5730<\/code>\u3001<code>FTP<\/code>\u3001<code>SFTP<\/code>\u3001<code>WebDAV<\/code>\u3001<code>\u963f\u91cc\u4e91OSS<\/code>\u3001<code>\u534e\u4e3a\u4e91OBS<\/code>\u3001<code>\u4e03\u725b\u4e91Kodo<\/code>\u3001<code>\u817e\u8baf\u4e91COS<\/code>\u3001<code>\u767e\u5ea6\u4e91 BOS<\/code>\u3001<code>\u53c8\u62cd\u4e91USS<\/code>\u3001<code>MinIO<\/code>\u3001<code>\u4eac\u4e1c\u4e91 OSS<\/code>\u3001<code>\u7f51\u6613\u6570\u5e06 NOS<\/code>\u7b49\u5176\u5b83\u517c\u5bb9 S3 \u534f\u8bae\u7684\u5e73\u53f0\uff0c\u53ea\u8981\u5728springboot\u4e2d\u901a\u8fc7\u6781\u7b80\u7684\u65b9\u5f0f\u5c31\u53ef\u4ee5\u5b9e\u73b0\u6587\u4ef6\u5b58\u50a8\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042682815\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h3>\u7b80\u5355\u914d\u7f6e<\/h3>\n<p>\u4e0b\u8fb9\u4ee5\u672c\u5730\u548cAliyun OSS\u4e0a\u4f20\u4e3a\u4f8b\uff0c<code>pom.xml<\/code>\u4e2d\u5f15\u5165\u5fc5\u8981\u7684<code>spring-file-storage.jar<\/code>\uff0c<strong>\u6ce8\u610f\uff1a<\/strong> \u5982\u679c\u8981\u4e0a\u4f20\u6587\u4ef6\u5230OSS\u5e73\u53f0\uff0c\u9700\u8981\u5f15\u5165\u5bf9\u5e94\u5e73\u53f0\u7684SDK\u5305\u3002<\/p>\n<pre><code class=\"xml\">&lt;!-- spring-file-storage \u5fc5\u987b\u8981\u5f15\u5165 --&gt;\n&lt;dependency&gt;\n    &lt;groupId&gt;cn.xuyanwu&lt;\/groupId&gt;\n    &lt;artifactId&gt;spring-file-storage&lt;\/artifactId&gt;\n    &lt;version&gt;0.5.0&lt;\/version&gt;\n&lt;\/dependency&gt;\n\n&lt;!-- \u963f\u91cc\u4e91oss --&gt;\n&lt;dependency&gt;\n    &lt;groupId&gt;com.aliyun.oss&lt;\/groupId&gt;\n    &lt;artifactId&gt;aliyun-sdk-oss&lt;\/artifactId&gt;\n    &lt;version&gt;3.10.2&lt;\/version&gt;\n&lt;\/dependency&gt;<\/code><\/pre>\n<p><code>application.yml<\/code>\u6587\u4ef6\u4e2d\u914d\u7f6e\u4e9b\u57fa\u7840\u4fe1\u606f\u3002<\/p>\n<ul>\n<li><code>enable-storage<\/code>\uff1a\u53ea\u6709\u72b6\u6001\u5f00\u542f\u624d\u4f1a\u88ab\u8bc6\u522b\u5230<\/li>\n<li><code>default-platform<\/code>\uff1a\u9ed8\u8ba4\u7684\u4e0a\u4f20\u5e73\u53f0<\/li>\n<li><code>domain<\/code>\uff1a\u751f\u6210\u7684\u6587\u4ef6url\u4e2d\u8bbf\u95ee\u7684\u57df\u540d<\/li>\n<li><code>base-path<\/code>\uff1a\u5b58\u50a8\u5730\u5740<\/li>\n<li><code>thumbnail-suffix<\/code>\uff1a\u7f29\u7565\u56fe\u540e\u7f00<\/li>\n<\/ul>\n<p>\u8981\u662f\u4e0a\u4f20OSS\u5bf9\u8c61\u5b58\u50a8\u5e73\u53f0\uff0c\u5c06<code>aliyun oss<\/code>\u63d0\u4f9b\u7684\u53d8\u91cf\u914d\u7f6e\u5230\u76f8\u5e94\u7684\u6a21\u5757\u4e0a\u5373\u53ef\u3002<\/p>\n<pre><code class=\"yaml\">spring:\n  #\u6587\u4ef6\u5b58\u50a8\u914d\u7f6e(\u672c\u5730\u3001oss)\n  file-storage:\n    default-platform: local-1\n    thumbnail-suffix: &quot;.min.jpg&quot; #\u7f29\u7565\u56fe\u540e\u7f00\n    local:\n      - platform: local-1 # \u5b58\u50a8\u5e73\u53f0\u6807\u8bc6\n        enable-storage: true #\u662f\u5426\u5f00\u542f\u672c\u5b58\u50a8\uff08\u53ea\u80fd\u9009\u4e00\u79cd\uff09\n        enable-access: true #\u542f\u7528\u8bbf\u95ee\uff08\u7ebf\u4e0a\u8bf7\u4f7f\u7528 Nginx \u914d\u7f6e\uff0c\u6548\u7387\u66f4\u9ad8\uff09\n        domain: &quot;http:\/\/127.0.0.1:2222&quot; #\u8bbf\u95ee\u57df\u540d\uff0c\u6ce8\u610f\u540e\u9762\u8981\u548cpath-patterns\u4fdd\u6301\u4e00\u81f4\uff0c\u201c\/\u201d\u7ed3\u5c3e\n        base-path: \/tmp\/Pictures\/ # \u5b58\u50a8\u5730\u5740\n        path-patterns: \/** #\u8bbf\u95ee\u8def\u5f84\n    aliyun-oss:\n      - platform: aliyun-oss\n        enable-storage: true\n        access-key: xxxx\n        secret-key: xxxx\n        end-point: xxx\n        bucket-name: firebook\n        domain: http:\/\/fire100.top\n        base-path: #\u4e91\u5e73\u53f0\u6587\u4ef6\u8def\u5f84<\/code><\/pre>\n<p><code>springboot<\/code>\u542f\u52a8\u7c7b\u4e2d\u589e\u52a0\u6ce8\u89e3<code>@EnableFileStorage<\/code>\uff0c\u663e\u5f0f\u7684\u5f00\u542f\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\uff0c\u5230\u8fd9\u5c31\u53ef\u4ee5\u7528\u4e86<\/p>\n<pre><code class=\"java\">@EnableFileStorage \/\/ \u6587\u4ef6\u4e0a\u4f20\u5de5\u5177\n@SpringBootApplication\npublic class SpringbootFileStorageApplication {\n\n    public static void main(String[] args) {\n        SpringApplication.run(SpringbootFileStorageApplication.class, args);\n    }\n}<\/code><\/pre>\n<h3>\u4e0a\u4f20\u6587\u4ef6<\/h3>\n<p>\u63a5\u4e0b\u6765\u5728\u4e1a\u52a1\u7c7b\u4e2d\u5f15\u5165<code>FileStorageService<\/code>\u670d\u52a1\uff0c\u5982\u4e0b\u53ea\u8981\u4e00\u884c\u4ee3\u7801\u5c31\u53ef\u4ee5\u5b8c\u6210\u6587\u4ef6\u4e0a\u4f20\uff0c\u662f\u4e0d\u662fSo easy\uff0c\u4e0b\u8f7d\u4e5f\u662f\u5982\u6cd5\u70ae\u5236\u3002<\/p>\n<pre><code class=\"java\">@RestController\npublic class FileController {\n\n    @Autowired\n    private FileStorageService fileStorageService;\n\n    \/**\n     * \u516c\u4f17\u53f7\uff1a\u7a0b\u5e8f\u5458\u5c0f\u5bcc\n     * \u4e0a\u4f20\u6587\u4ef6\n     *\/\n    @PostMapping(value = {&quot;\/upload&quot;})\n    public Object upload(MultipartFile file) {\n        FileInfo upload  = fileStorageService.of(file).upload();\n        return upload;\n    }\n}<\/code><\/pre>\n<p>\u6211\u4eec\u7528<code>postman<\/code>\u6d4b\u8bd5\u4e0a\u4f20\u4e00\u5f20\u56fe\u7247\uff0c\u770b\u5230\u56fe\u7247\u5df2\u7ecf\u6210\u529f\u4f20\u5230\u4e86<code>\/tmp\/Pictures<\/code>\u76ee\u5f55\u4e0b\uff0c\u8fd4\u56de\u7ed3\u679c\u4e2d\u5305\u542b\u4e86\u5b8c\u6574\u7684\u8bbf\u95ee\u6587\u4ef6\u7684URL\u8def\u5f84\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042682816\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042682817\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4e0d\u4ec5\u5982\u6b64<code>spring-file-storage<\/code>\u8fd8\u652f\u6301\u591a\u79cd\u6587\u4ef6\u5f62\u5f0f\uff0c<code>URI<\/code>\u3001<code>URL<\/code>\u3001<code>String<\/code>\u3001<code>byte[]<\/code>\u3001<code>InputStream<\/code>\u3001<code>MultipartFile<\/code>\uff0c\u4f7f\u5f00\u53d1\u66f4\u52a0\u7075\u6d3b\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042682818\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\uff0c\u66f4\u591a\u65f6\u5019\u6211\u4eec\u90fd\u662f\u5728\u4e0a\u4f20\u56fe\u7247\uff0c\u90a3\u5c31\u4f1a\u6709<code>\u52a8\u6001\u88c1\u526a\u56fe\u7247<\/code>\u3001<code>\u751f\u6210\u7f29\u7565\u56fe<\/code>\u7684\u9700\u6c42\uff0c\u8fd9\u4e9b spring-file-storage \u90fd\u53ef\u4ee5\u5f88\u5bb9\u6613\u5b9e\u73b0\u3002<\/p>\n<pre><code class=\"java\">\/**\n * \u516c\u4f17\u53f7\uff1a\u7a0b\u5e8f\u5458\u5c0f\u5bcc\n * \u4e0a\u4f20\u56fe\u7247\u88c1\u526a\u5927\u5c0f\u5e76\u751f\u6210\u4e00\u5f20\u7f29\u7565\u56fe\n *\/\n@PostMapping(&quot;\/uploadThumbnail&quot;)\npublic FileInfo uploadThumbnail(MultipartFile file) {\n    return fileStorageService.of(file)\n            .image(img -&gt; img.size(1000,1000))  \/\/\u5c06\u56fe\u7247\u5927\u5c0f\u8c03\u6574\u5230 1000*1000\n            .thumbnail(th -&gt; th.size(200,200))  \/\/\u518d\u751f\u6210\u4e00\u5f20 200*200 \u7684\u7f29\u7565\u56fe\n            .upload();\n}<\/code><\/pre>\n<p>\u800c\u4e14\u6211\u4eec\u8fd8\u53ef\u4ee5\u52a8\u6001\u9009\u62e9\u4e0a\u4f20\u5e73\u53f0\uff0c\u914d\u7f6e\u6587\u4ef6\u4e2d\u5c06\u6240\u6709\u5e73\u53f0\u5f00\u542f\uff0c\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\u81ea\u7531\u7684\u9009\u62e9\u3002<\/p>\n<pre><code class=\"java\">\/**\n * \u516c\u4f17\u53f7\uff1a\u7a0b\u5e8f\u5458\u5c0f\u5bcc\n * \u4e0a\u4f20\u6587\u4ef6\u5230\u6307\u5b9a\u5b58\u50a8\u5e73\u53f0\uff0c\u6210\u529f\u8fd4\u56de\u6587\u4ef6\u4fe1\u606f\n *\/\n@PostMapping(&quot;\/upload-platform&quot;)\npublic FileInfo uploadPlatform(MultipartFile file) {\n    return fileStorageService.of(file)\n            .setPlatform(&quot;aliyun-oss&quot;)    \/\/\u4f7f\u7528\u6307\u5b9a\u7684\u5b58\u50a8\u5e73\u53f0\n            .upload();\n}<\/code><\/pre>\n<h3>\u4e0b\u8f7d\u6587\u4ef6<\/h3>\n<p>\u4e0b\u8f7d\u6587\u4ef6\u4e5f\u540c\u6837\u7684\u7b80\u5355\uff0c\u53ef\u4ee5\u76f4\u63a5\u6839\u636e\u6587\u4ef6url\u6216\u8005\u6587\u4ef6\u6d41\u4e0b\u8f7d\u3002<\/p>\n<pre><code class=\"java\">\/**\n * \u516c\u4f17\u53f7\uff1a\u7a0b\u5e8f\u5458\u5c0f\u5bcc\n * \u4e0b\u8f7d\u6587\u4ef6\n *\/\n@PostMapping(&quot;\/download&quot;)\npublic void download(MultipartFile file) {\n    \/\/ \u83b7\u53d6\u6587\u4ef6\u4fe1\u606f\n    FileInfo fileInfo = fileStorageService.getFileInfoByUrl(&quot;http:\/\/file.abc.com\/test\/a.jpg&quot;);\n    \n    \/\/ \u4e0b\u8f7d\u5230\u6587\u4ef6\n    fileStorageService.download(fileInfo).file(&quot;C:\/\/a.jpg&quot;);\n\n    \/\/ \u76f4\u63a5\u901a\u8fc7\u6587\u4ef6\u4fe1\u606f\u4e2d\u7684 url \u4e0b\u8f7d\uff0c\u7701\u53bb\u624b\u52a8\u67e5\u8be2\u6587\u4ef6\u4fe1\u606f\u8bb0\u5f55\u7684\u8fc7\u7a0b\n    fileStorageService.download(&quot;http:\/\/file.abc.com\/test\/a.jpg&quot;).file(&quot;C:\/\/a.jpg&quot;);\n\n    \/\/ \u4e0b\u8f7d\u7f29\u7565\u56fe\n    fileStorageService.downloadTh(fileInfo).file(&quot;C:\/\/th.jpg&quot;);\n}<\/code><\/pre>\n<p>\u63d0\u4f9b\u4e86\u76d1\u542c\u4e0b\u8f7d\u8fdb\u5ea6\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u6e05\u6670\u660e\u4e86\u7684\u638c\u63e1\u6587\u4ef6\u7684\u4e0b\u8f7d\u60c5\u51b5\u3002<\/p>\n<pre><code class=\"java\">\/\/ \u4e0b\u8f7d\u6587\u4ef6 \u663e\u793a\u8fdb\u5ea6\nfileStorageService.download(fileInfo).setProgressMonitor(new ProgressListener() {\n    @Override\n    public void start() {\n        System.out.println(&quot;\u4e0b\u8f7d\u5f00\u59cb&quot;);\n    }\n\n    @Override\n    public void progress(long progressSize,long allSize) {\n        System.out.println(&quot;\u5df2\u4e0b\u8f7d &quot; + progressSize + &quot; \u603b\u5927\u5c0f&quot; + allSize);\n    }\n\n    @Override\n    public void finish() {\n        System.out.println(&quot;\u4e0b\u8f7d\u7ed3\u675f&quot;);\n    }\n}).file(&quot;C:\/\/a.jpg&quot;);<\/code><\/pre>\n<h3>\u6587\u4ef6\u5b58\u5728\u3001\u5220\u9664<\/h3>\n<p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u6839\u636e\u6587\u4ef6\u7684URL\u5730\u5740\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3001\u4ee5\u53ca\u5220\u9664\u6587\u4ef6\u3002<\/p>\n<pre><code class=\"java\">\/\/\u76f4\u63a5\u901a\u8fc7\u6587\u4ef6\u4fe1\u606f\u4e2d\u7684 url \u5220\u9664\uff0c\u7701\u53bb\u624b\u52a8\u67e5\u8be2\u6587\u4ef6\u4fe1\u606f\u8bb0\u5f55\u7684\u8fc7\u7a0b\nfileStorageService.delete(&quot;http:\/\/file.abc.com\/test\/a.jpg&quot;);<\/code><\/pre>\n<pre><code class=\"java\">\/\/\u76f4\u63a5\u901a\u8fc7\u6587\u4ef6\u4fe1\u606f\u4e2d\u7684 url \u5224\u65ad\u6587\u4ef6\u662f\u5426\u5b58\u5728\uff0c\u7701\u53bb\u624b\u52a8\u67e5\u8be2\u6587\u4ef6\u4fe1\u606f\u8bb0\u5f55\u7684\u8fc7\u7a0b\nboolean exists2 = fileStorageService.exists(&quot;http:\/\/file.abc.com\/test\/a.jpg&quot;);<\/code><\/pre>\n<h3>\u5207\u9762<\/h3>\n<p>\u5de5\u5177\u8fd8\u63d0\u4f9b\u4e86\u6bcf\u79cd\u64cd\u4f5c\u7684\u5207\u9762\uff0c\u53ef\u4ee5\u5728\u6bcf\u4e2a\u52a8\u4f5c\u7684\u524d\u540e\u8fdb\u884c\u5e72\u9884\uff0c\u6bd4\u5982\u6253\u65e5\u5fd7\u6216\u8005\u73a9\u70b9\u82b1\u6d3b\uff0c\u5b9e\u73b0<code>FileStorageAspect<\/code>\u7c7b\u91cd\u5199\u5bf9\u5e94\u52a8\u4f5c\u7684xxxAround\u65b9\u6cd5\u3002<\/p>\n<pre><code class=\"java\">**\n * \u4f7f\u7528\u5207\u9762\u6253\u5370\u6587\u4ef6\u4e0a\u4f20\u548c\u5220\u9664\u7684\u65e5\u5fd7\n *\/\n@Slf4j\n@Component\npublic class LogFileStorageAspect implements FileStorageAspect {\n\n    \/**\n     * \u4e0a\u4f20\uff0c\u6210\u529f\u8fd4\u56de\u6587\u4ef6\u4fe1\u606f\uff0c\u5931\u8d25\u8fd4\u56de null\n     *\/\n    @Override\n    public FileInfo uploadAround(UploadAspectChain chain, FileInfo fileInfo, UploadPretreatment pre, FileStorage fileStorage, FileRecorder fileRecorder) {\n        log.info(&quot;\u4e0a\u4f20\u6587\u4ef6 before -&gt; {}&quot;,fileInfo);\n        fileInfo = chain.next(fileInfo,pre,fileStorage,fileRecorder);\n        log.info(&quot;\u4e0a\u4f20\u6587\u4ef6 after -&gt; {}&quot;,fileInfo);\n        return fileInfo;\n    }\n}<\/code><\/pre>\n<blockquote><p>demo\u6848\u4f8b\u5730\u5740\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=BLXKItN3j62T2rqDCgmmCA%3D%3D.FzhexasiEyNRVFFcC9x4Bghlg3GI21GGdETC5XjcAYZDvRvfSUuwfpeImIskYgz9EdoL5eGE4GCMs6vvTZW65gfOEFW4GWdZ0Q8RSNQHQpexySl2a%2BEZ886mtkrwcmSM\" rel=\"nofollow\">https:\/\/github.com\/chengxy-nd&#8230;<\/a><\/p><\/blockquote>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u7528\u4e86\u8fd9\u4e2a\u5de5\u5177\u786e\u5b9e\u6781\u5927\u7684\u51cf\u5c11\u4e86\u4e0a\u4f20\u6587\u4ef6\u6240\u5e26\u6765\u7684\u4ee3\u7801\u91cf\uff0c\u63d0\u5347\u4e86\u5f00\u53d1\u6548\u7387\uff0c\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u6682\u672a\u53d1\u73b0\u6709\u4ec0\u4e48\u5751\uff0c\u597d\u4e1c\u897f\u5c31\u662f\u8981\u5927\u5bb6\u5206\u4eab\uff0c\u5982\u679c\u7b26\u5408\u4f60\u7684\u9700\u6c42\uff0c\u72b9\u8c6b\u4ec0\u4e48\u7528\u8d77\u6765\u5427\u3002<\/p>\n<blockquote><p>\u6280\u672f\u4ea4\u6d41\uff0c\u516c\u4f17\u53f7\uff1a\u7a0b\u5e8f\u5458\u5c0f\u5bcc<\/p><\/blockquote>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042682812\">https:\/\/segmentfault.com\/a\/1190000042682812<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u5c0f\u5bcc~ \u53c8\u662f\u505a\u597d\u4eba\u597d\u4e8b\u7684\u4e00\u5929\uff0c\u6709\u4e2a\u5c0f\u53ef\u7231\u79c1\u4e0b\u95ee\u6211\u6709\u6ca1\u6709\u597d\u7528\u7684springboot\u6587\u4ef6\u4e0a\u4f20\u5de5\u5177\uff0c\u8fd9\u4e0d [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006730","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006730"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006730\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}