{"id":3642,"date":"2023-11-15T16:19:51","date_gmt":"2023-11-15T08:19:51","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=3642"},"modified":"2023-11-15T16:19:52","modified_gmt":"2023-11-15T08:19:52","slug":"spring-boot-%e5%bc%95%e5%85%a5%e7%ba%bf%e7%a8%8b%e6%b1%a0queue%e7%bc%93%e5%86%b2%e9%98%9f%e5%88%97%e5%ae%9e%e7%8e%b0%e9%ab%98%e5%b9%b6%e5%8f%91%e4%b8%8b%e5%8d%95%e4%b8%9a%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/uncategorized\/spring-boot-%e5%bc%95%e5%85%a5%e7%ba%bf%e7%a8%8b%e6%b1%a0queue%e7%bc%93%e5%86%b2%e9%98%9f%e5%88%97%e5%ae%9e%e7%8e%b0%e9%ab%98%e5%b9%b6%e5%8f%91%e4%b8%8b%e5%8d%95%e4%b8%9a%e5%8a%a1\/","title":{"rendered":"Spring Boot \u5f15\u5165\u7ebf\u7a0b\u6c60+Queue\u7f13\u51b2\u961f\u5217\u5b9e\u73b0\u9ad8\u5e76\u53d1\u4e0b\u5355\u4e1a\u52a1"},"content":{"rendered":"\n<p>\u4e3b\u8981\u662f\u81ea\u5df1\u5728\u9879\u76ee\u4e2d(\u4e2d\u5c0f\u578b\u9879\u76ee) \u6709\u652f\u4ed8\u4e0b\u5355\u4e1a\u52a1(\u53ea\u662f\u529e\u7406VIP\uff0c\u6ca1\u6709\u6d89\u53ca\u5230\u5546\u54c1\u5e93\u5b58)\uff0c\u76ee\u524d\u7528\u6237\u91cf\u8fd8\u6ca1\u6709\u4e0a\u6765\uff0c\u76ee\u524d\u6ca1\u6709\u51fa\u73b0\u95ee\u9898\uff0c\u4f46\u662f\u60f3\u5230\u5982\u679c\u7528\u6237\u91cf\u53d8\u5927\uff0c\u4e0b\u5355\u5e76\u53d1\u91cf\u53d8\u5927\uff0c\u53ef\u80fd\u4f1a\u51fa\u73b0\u4e00\u7cfb\u5217\u7684\u95ee\u9898\uff0c\u8d81\u7740\u7a7a\u95f2\u65f6\u95f4\uff0c\u505a\u4e86\u8fd9\u4e2ademo\u6d4b\u8bd5\u76f8\u5173\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8ba2\u5355\u91cd\u590d<\/li>\n\n\n\n<li>\u9ad8\u5e76\u53d1\u4e0b\uff0c\u6027\u80fd\u53d8\u6162<\/li>\n<\/ol>\n\n\n\n<p>\u89e3\u51b3\u65b9\u5f0f\uff1a<code>ThreadPoolExecutor<\/code>\u7ebf\u7a0b\u6c60 + Queue\u961f\u5217<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"wznav_0\">[1.\u9996\u5148\u662fspringBoot\u7684\u9879\u76ee\u6846\u67b6\u5982\u4e0b\uff1a]<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"296\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-3643 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png 748w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167-300x119.png 300w\" sizes=\"auto, (max-width: 748px) 100vw, 748px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"296\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png\" alt=\"\" class=\"wp-image-3643\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png 748w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167-300x119.png 300w\" sizes=\"auto, (max-width: 748px) 100vw, 748px\" \/><\/noscript><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;2.\u4e1a\u52a1\u6d4b\u8bd5\u6d41\u7a0b\u6d89\u53ca\u7684\u7c7b\uff0c\u5982\u4e0b]\n\u2013 BusinessThread \u7c7b<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.springboot.demo.Threads;\n\nimport org.springframework.context.annotation.Scope;\nimport org.springframework.stereotype.Component;\n\n@Component\n@Scope(\"prototype\")\/\/spring \u591a\u4f8b\npublic class BusinessThread implements Runnable{\n\n    private String acceptStr;\n\n    public BusinessThread(String acceptStr) {\n        this.acceptStr = acceptStr;\n    }\n\n    public String getAcceptStr() {\n        return acceptStr;\n    }\n\n    public void setAcceptStr(String acceptStr) {\n        this.acceptStr = acceptStr;\n    }\n\n    @Override\n    public void run() {\n        \/\/\u4e1a\u52a1\u64cd\u4f5c\n        System.out.println(\"\u591a\u7ebf\u7a0b\u5df2\u7ecf\u5904\u7406\u8ba2\u5355\u63d2\u5165\u7cfb\u7edf\uff0c\u8ba2\u5355\u53f7\uff1a\"+acceptStr);\n\n        \/\/\u7ebf\u7a0b\u963b\u585e\n        \/*try {\n            Thread.sleep(1000);\n            System.out.println(\"\u591a\u7ebf\u7a0b\u5df2\u7ecf\u5904\u7406\u8ba2\u5355\u63d2\u5165\u7cfb\u7edf\uff0c\u8ba2\u5355\u53f7\uff1a\"+acceptStr);\n        } catch (InterruptedException e) {\n            e.printStackTrace();\n        }*\/\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>\u2013 TestThreadPoolManager \u7c7b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.springboot.demo.Threads;\n\nimport org.springframework.beans.BeansException;\nimport org.springframework.beans.factory.BeanFactory;\nimport org.springframework.beans.factory.BeanFactoryAware;\nimport org.springframework.stereotype.Component;\n\nimport java.util.Map;\nimport java.util.Queue;\nimport java.util.concurrent.*;\n\n@Component\npublic class TestThreadPoolManager implements BeanFactoryAware {\n\n    \/\/\u7528\u4e8e\u4eceIOC\u91cc\u53d6\u5bf9\u8c61\n    private BeanFactory factory; \/\/\u5982\u679c\u5b9e\u73b0Runnable\u7684\u7c7b\u662f\u901a\u8fc7spring\u7684application.xml\u6587\u4ef6\u8fdb\u884c\u6ce8\u5165,\u53ef\u901a\u8fc7 factory.getBean()\u83b7\u53d6\uff0c\u8fd9\u91cc\u53ea\u662f\u63d0\u4e00\u4e0b\n\n    \/\/ \u7ebf\u7a0b\u6c60\u7ef4\u62a4\u7ebf\u7a0b\u7684\u6700\u5c11\u6570\u91cf\n    private final static int CORE_POOL_SIZE = 2;\n    \/\/ \u7ebf\u7a0b\u6c60\u7ef4\u62a4\u7ebf\u7a0b\u7684\u6700\u5927\u6570\u91cf\n    private final static int MAX_POOL_SIZE = 10;\n    \/\/ \u7ebf\u7a0b\u6c60\u7ef4\u62a4\u7ebf\u7a0b\u6240\u5141\u8bb8\u7684\u7a7a\u95f2\u65f6\u95f4\n    private final static int KEEP_ALIVE_TIME = 0;\n    \/\/ \u7ebf\u7a0b\u6c60\u6240\u4f7f\u7528\u7684\u7f13\u51b2\u961f\u5217\u5927\u5c0f\n    private final static int WORK_QUEUE_SIZE = 50;\n\n    @Override\n    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {\n        factory = beanFactory;\n    }\n\n    \/**\n     * \u7528\u4e8e\u50a8\u5b58\u5728\u961f\u5217\u4e2d\u7684\u8ba2\u5355,\u9632\u6b62\u91cd\u590d\u63d0\u4ea4,\u5728\u771f\u5b9e\u573a\u666f\u4e2d\uff0c\u53ef\u7528redis\u4ee3\u66ff \u9a8c\u8bc1\u91cd\u590d\n     *\/\n    Map&lt;String, Object> cacheMap = new ConcurrentHashMap&lt;>();\n\n\n    \/**\n     * \u8ba2\u5355\u7684\u7f13\u51b2\u961f\u5217,\u5f53\u7ebf\u7a0b\u6c60\u6ee1\u4e86\uff0c\u5219\u5c06\u8ba2\u5355\u5b58\u5165\u5230\u6b64\u7f13\u51b2\u961f\u5217\n     *\/\n    Queue&lt;Object> msgQueue = new LinkedBlockingQueue&lt;Object>();\n\n\n    \/**\n     * \u5f53\u7ebf\u7a0b\u6c60\u7684\u5bb9\u91cf\u6ee1\u4e86\uff0c\u6267\u884c\u4e0b\u9762\u4ee3\u7801\uff0c\u5c06\u8ba2\u5355\u5b58\u5165\u5230\u7f13\u51b2\u961f\u5217\n     *\/\n    final RejectedExecutionHandler handler = new RejectedExecutionHandler() {\n        @Override\n        public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {\n            \/\/\u8ba2\u5355\u52a0\u5165\u5230\u7f13\u51b2\u961f\u5217\n            msgQueue.offer(((BusinessThread) r).getAcceptStr());\n            System.out.println(\"\u7cfb\u7edf\u4efb\u52a1\u592a\u5fd9\u4e86,\u628a\u6b64\u8ba2\u5355\u4ea4\u7ed9(\u8c03\u5ea6\u7ebf\u7a0b\u6c60)\u9010\u4e00\u5904\u7406\uff0c\u8ba2\u5355\u53f7\uff1a\" + ((BusinessThread) r).getAcceptStr());\n        }\n    };\n\n\n    \/**\u521b\u5efa\u7ebf\u7a0b\u6c60*\/\n   final ThreadPoolExecutor threadPool = new ThreadPoolExecutor(CORE_POOL_SIZE, MAX_POOL_SIZE, KEEP_ALIVE_TIME, TimeUnit.SECONDS, new ArrayBlockingQueue(WORK_QUEUE_SIZE), this.handler);\n\n\n    \/**\u5c06\u4efb\u52a1\u52a0\u5165\u8ba2\u5355\u7ebf\u7a0b\u6c60*\/\n    public void addOrders(String orderId){\n        System.out.println(\"\u6b64\u8ba2\u5355\u51c6\u5907\u6dfb\u52a0\u5230\u7ebf\u7a0b\u6c60\uff0c\u8ba2\u5355\u53f7\uff1a\" + orderId);\n        \/\/\u9a8c\u8bc1\u5f53\u524d\u8fdb\u5165\u7684\u8ba2\u5355\u662f\u5426\u5df2\u7ecf\u5b58\u5728\n        if (cacheMap.get(orderId) == null) {\n            cacheMap.put(orderId, new Object());\n            BusinessThread businessThread = new BusinessThread(orderId);\n            threadPool.execute(businessThread);\n        }\n    }\n\n    \/**\n     * \u7ebf\u7a0b\u6c60\u7684\u5b9a\u65f6\u4efb\u52a1----> \u79f0\u4e3a(\u8c03\u5ea6\u7ebf\u7a0b\u6c60)\u3002\u6b64\u7ebf\u7a0b\u6c60\u652f\u6301 \u5b9a\u65f6\u4ee5\u53ca\u5468\u671f\u6027\u6267\u884c\u4efb\u52a1\u7684\u9700\u6c42\u3002\n     *\/\n    final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(5);\n\n\n    \/**\n     * \u68c0\u67e5(\u8c03\u5ea6\u7ebf\u7a0b\u6c60)\uff0c\u6bcf\u79d2\u6267\u884c\u4e00\u6b21\uff0c\u67e5\u770b\u8ba2\u5355\u7684\u7f13\u51b2\u961f\u5217\u662f\u5426\u6709 \u8ba2\u5355\u8bb0\u5f55\uff0c\u5219\u91cd\u65b0\u52a0\u5165\u5230\u7ebf\u7a0b\u6c60\n     *\/\n    final ScheduledFuture scheduledFuture = scheduler.scheduleAtFixedRate(new Runnable() {\n        @Override\n        public void run() {\n            \/\/\u5224\u65ad\u7f13\u51b2\u961f\u5217\u662f\u5426\u5b58\u5728\u8bb0\u5f55\n            if(!msgQueue.isEmpty()){\n                \/\/\u5f53\u7ebf\u7a0b\u6c60\u7684\u961f\u5217\u5bb9\u91cf\u5c11\u4e8eWORK_QUEUE_SIZE\uff0c\u5219\u5f00\u59cb\u628a\u7f13\u51b2\u961f\u5217\u7684\u8ba2\u5355 \u52a0\u5165\u5230 \u7ebf\u7a0b\u6c60\n                if (threadPool.getQueue().size() &lt; WORK_QUEUE_SIZE) {\n                    String orderId = (String) msgQueue.poll();\n                    BusinessThread businessThread = new BusinessThread(orderId);\n                    threadPool.execute(businessThread);\n                    System.out.println(\"(\u8c03\u5ea6\u7ebf\u7a0b\u6c60)\u7f13\u51b2\u961f\u5217\u51fa\u73b0\u8ba2\u5355\u4e1a\u52a1\uff0c\u91cd\u65b0\u6dfb\u52a0\u5230\u7ebf\u7a0b\u6c60\uff0c\u8ba2\u5355\u53f7\uff1a\"+orderId);\n                }\n            }\n        }\n    }, 0, 1, TimeUnit.SECONDS);\n\n\n    \/**\u83b7\u53d6\u6d88\u606f\u7f13\u51b2\u961f\u5217*\/\n    public Queue&lt;Object> getMsgQueue() {\n        return msgQueue;\n    }\n\n    \/**\u7ec8\u6b62\u8ba2\u5355\u7ebf\u7a0b\u6c60+\u8c03\u5ea6\u7ebf\u7a0b\u6c60*\/\n    public void shutdown() {\n        \/\/true\u8868\u793a\u5982\u679c\u5b9a\u65f6\u4efb\u52a1\u5728\u6267\u884c\uff0c\u7acb\u5373\u4e2d\u6b62\uff0cfalse\u5219\u7b49\u5f85\u4efb\u52a1\u7ed3\u675f\u540e\u518d\u505c\u6b62\n        System.out.println(\"\u7ec8\u6b62\u8ba2\u5355\u7ebf\u7a0b\u6c60+\u8c03\u5ea6\u7ebf\u7a0b\u6c60\uff1a\"+scheduledFuture.cancel(false));\n        scheduler.shutdown();\n        threadPool.shutdown();\n\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u2013 TestController \u7c7b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.springboot.demo;\n\nimport com.springboot.demo.Threads.TestThreadPoolManager;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RestController;\n\nimport java.util.Queue;\nimport java.util.UUID;\n\n\/**\n * Created by Administrator on 2018\/5\/9.\n *\/\n@RestController\npublic class TestController {\n\n    @Autowired\n    TestThreadPoolManager testThreadPoolManager;\n\n    \/**\n     * \u6d4b\u8bd5\u6a21\u62df\u4e0b\u5355\u8bf7\u6c42 \u5165\u53e3\n     * @param id\n     * @return\n     *\/\n    @GetMapping(\"\/start\/{id}\")\n    public String start(@PathVariable Long id) {\n        \/\/\u6a21\u62df\u7684\u968f\u673a\u6570\n        String orderNo = System.currentTimeMillis() + UUID.randomUUID().toString();\n\n        testThreadPoolManager.addOrders(orderNo);\n\n        return \"Test ThreadPoolExecutor start\";\n    }\n\n    \/**\n     * \u505c\u6b62\u670d\u52a1\n     * @param id\n     * @return\n     *\/\n    @GetMapping(\"\/end\/{id}\")\n    public String end(@PathVariable Long id) {\n\n        testThreadPoolManager.shutdown();\n\n        Queue q = testThreadPoolManager.getMsgQueue();\n        System.out.println(\"\u5173\u95ed\u4e86\u7ebf\u7a0b\u670d\u52a1\uff0c\u8fd8\u6709\u672a\u5904\u7406\u7684\u4fe1\u606f\u6761\u6570\uff1a\" + q.size());\n        return \"Test ThreadPoolExecutor start\";\n    }\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"wznav_5\">[3.\u4f7f\u7528JMeter\u6a21\u62df\u5e76\u53d1\u4e0b\u5355\u8bf7\u6c42]<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"161\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" alt=\"\" class=\"wp-image-3644 lazyload\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844.png 620w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844-300x78.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"161\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844.png\" alt=\"\" class=\"wp-image-3644\" srcset=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844.png 620w, https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844-300x78.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/noscript><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"wznav_6\">[4.\u7ed3\u679c]<\/h4>\n\n\n\n<p>\u6253\u5370\u7684\u65e5\u5fd7\u8bf4\u660e\uff0c\u5f00\u59cb\u7684\u8ba2\u5355\u76f4\u63a5\u6267\u884c\u63d2\u5165\u5230\u7cfb\u7edf\uff0c\u5f53\u7ebf\u7a0b\u6c60\u7684\u5bb9\u91cf\u5df2\u7ecf\u6ee1\u4e86\uff0c\u5219\u4f7f\u7528<code>RejectedExecutionHandler<\/code>\u65b9\u6cd5\u628a\u540e\u9762\u7684\u8ba2\u5355\u6dfb\u52a0\u5230 Queue\u7f13\u51b2\u961f\u5217\uff0c\u4f7f\u7528<code>ScheduledFuture<\/code>\u65b9\u6cd5\u5b9a\u65f6(\u6211\u8fd9\u91cc\u662f\u6bcf\u79d2\u4e00\u6b21)\u68c0\u67e5Queue\u961f\u5217\uff0c\u91cd\u65b0\u628a\u961f\u5217\u91cc\u9762\u7684\u8ba2\u5355\u6dfb\u52a0\u5230\u7ebf\u7a0b\u6c60\uff0c\u6267\u884c\u540e\u9762\u7684\u63d2\u5165\u4efb\u52a1\u3002<\/p>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u4e3b\u8981\u662f\u81ea\u5df1\u5728\u9879\u76ee\u4e2d(\u4e2d\u5c0f\u578b\u9879\u76ee) \u6709\u652f\u4ed8\u4e0b\u5355\u4e1a\u52a1(\u53ea\u662f\u529e\u7406VIP\uff0c\u6ca1\u6709\u6d89\u53ca\u5230\u5546\u54c1\u5e93\u5b58)\uff0c\u76ee\u524d\u7528\u6237\u91cf\u8fd8\u6ca1\u6709\u4e0a\u6765\uff0c\u76ee\u524d\u6ca1\u6709\u51fa\u73b0\u95ee\u9898\uff0c\u4f46 &#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":[1],"tags":[],"class_list":["post-3642","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081637167.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/11\/20231115081918844.png","id":"image3"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"\u672a\u5206\u7c7b","post_date":"2023-11-15","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":381,"next_post_id":5961,"next_post_title":"\u7f51\u7edc\u8bca\u65ad\u5229\u5668\uff1a\u638c\u63e1 Kubernetes Pod \u6293\u5305\u6280\u5de7","previous_post_id":3286,"previous_post_title":"\u5c0f\u7a0b\u5e8f\u7edf\u4e00\u53d1\u9001\u6d88\u606f","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/3642","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=3642"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/3642\/revisions"}],"predecessor-version":[{"id":3645,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/3642\/revisions\/3645"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}