{"id":186,"date":"2026-06-26T10:27:41","date_gmt":"2026-06-26T02:27:41","guid":{"rendered":"https:\/\/yykcj.com\/?p=186"},"modified":"2026-06-26T10:27:41","modified_gmt":"2026-06-26T02:27:41","slug":"%e5%88%86%e5%b8%83%e5%bc%8f%e4%ba%8b%e5%8a%a1%e5%ae%9e%e6%88%98%ef%bc%9asaga%e3%80%81tcc%e4%b8%8e%e6%9c%80%e7%bb%88%e4%b8%80%e8%87%b4%e6%80%a7%e6%a8%a1%e5%bc%8f%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/yykcj.com\/?p=186","title":{"rendered":"\u5206\u5e03\u5f0f\u4e8b\u52a1\u5b9e\u6218\uff1aSaga\u3001TCC\u4e0e\u6700\u7ec8\u4e00\u81f4\u6027\u6a21\u5f0f\u8be6\u89e3"},"content":{"rendered":"<p>\u5728\u5fae\u670d\u52a1\u67b6\u6784\u4e2d\uff0c\u5206\u5e03\u5f0f\u4e8b\u52a1\u662f\u7ed5\u4e0d\u5f00\u7684\u96be\u9898\u3002\u4f20\u7edf\u6570\u636e\u5e93\u7684ACID\u4e8b\u52a1\u65e0\u6cd5\u8de8\u670d\u52a1\uff0c\u56e0\u6b64\u9700\u8981\u5f15\u5165\u7279\u6b8a\u7684\u6a21\u5f0f\u6765\u4fdd\u8bc1\u6570\u636e\u6700\u7ec8\u4e00\u81f4\u6027\u3002\u672c\u6587\u901a\u8fc7\u5b9e\u6218\u4ee3\u7801\uff0c\u5bf9\u6bd4\u4e09\u79cd\u5e38\u89c1\u6a21\u5f0f\uff1aSaga\u3001TCC\u548c\u6700\u7ec8\u4e00\u81f4\u6027\uff08\u57fa\u4e8e\u6d88\u606f\u961f\u5217\uff09\u3002<\/p>\n<h2>1. \u573a\u666f\u8bbe\u5b9a<\/h2>\n<p>\u5047\u8bbe\u4e00\u4e2a\u7535\u5546\u4e0b\u5355\u6d41\u7a0b\uff1a<\/p>\n<ul>\n<li>\u8ba2\u5355\u670d\u52a1\uff08Order Service\uff09\uff1a\u521b\u5efa\u8ba2\u5355<\/li>\n<li>\u5e93\u5b58\u670d\u52a1\uff08Inventory Service\uff09\uff1a\u6263\u51cf\u5e93\u5b58<\/li>\n<li>\u652f\u4ed8\u670d\u52a1\uff08Payment Service\uff09\uff1a\u6263\u6b3e<\/li>\n<\/ul>\n<p>\u6211\u4eec\u9700\u8981\u4fdd\u8bc1\u8fd9\u4e09\u6b65\u8981\u4e48\u5168\u90e8\u6210\u529f\uff0c\u8981\u4e48\u5168\u90e8\u56de\u6eda\uff08\u6216\u8865\u507f\uff09\u3002<\/p>\n<h2>2. Saga\u6a21\u5f0f<\/h2>\n<p>Saga\u662f\u4e00\u79cd\u957f\u4e8b\u52a1\u6a21\u5f0f\uff0c\u5c06\u5927\u4e8b\u52a1\u62c6\u5206\u4e3a\u4e00\u7cfb\u5217\u672c\u5730\u4e8b\u52a1\uff0c\u6bcf\u4e2a\u672c\u5730\u4e8b\u52a1\u90fd\u6709\u5bf9\u5e94\u7684\u8865\u507f\u64cd\u4f5c\u3002Saga\u5206\u4e3a\u4e24\u79cd\u7f16\u6392\u65b9\u5f0f\uff1a<strong>\u7f16\u6392\uff08Choreography\uff09<\/strong>\u548c<strong>\u534f\u8c03\uff08Orchestration\uff09<\/strong>\u3002<\/p>\n<h3>2.1 \u7f16\u6392\u5f0fSaga\uff08\u57fa\u4e8e\u4e8b\u4ef6\uff09<\/h3>\n<p>\u670d\u52a1\u4e4b\u95f4\u901a\u8fc7\u4e8b\u4ef6\u9a71\u52a8\uff0c\u6bcf\u4e2a\u670d\u52a1\u5728\u5b8c\u6210\u64cd\u4f5c\u540e\u53d1\u5e03\u4e8b\u4ef6\uff0c\u89e6\u53d1\u4e0b\u4e00\u4e2a\u670d\u52a1\u3002<\/p>\n<h4>\u4ee3\u7801\u793a\u4f8b\uff08Node.js + RabbitMQ\uff09<\/h4>\n<pre><code class=\"language-javascript\">\n\/\/ order-service\/index.js\nconst amqp = require(&#x27;amqplib&#x27;);\n\nasync function createOrder(order) {\n    \/\/ 1. \u521b\u5efa\u8ba2\u5355\uff08\u672c\u5730\u4e8b\u52a1\uff09\n    await db.orders.insert(order);\n    \n    \/\/ 2. \u53d1\u5e03\u201c\u8ba2\u5355\u521b\u5efa\u201d\u4e8b\u4ef6\n    const conn = await amqp.connect(&#x27;amqp:\/\/localhost&#x27;);\n    const channel = await conn.createChannel();\n    channel.publish(&#x27;exchange&#x27;, &#x27;order.created&#x27;, Buffer.from(JSON.stringify(order)));\n    \n    \/\/ 3. \u7b49\u5f85\u540e\u7eed\u4e8b\u4ef6\uff08\u5982\u5e93\u5b58\u6263\u51cf\u6210\u529f\/\u5931\u8d25\uff09\n    \/\/ \u5b9e\u9645\u5e94\u7528\u4e2d\u4f1a\u76d1\u542c\u56de\u590d\u961f\u5217\n}\n<\/code><\/pre>\n<pre><code class=\"language-javascript\">\n\/\/ inventory-service\/index.js\nconst amqp = require(&#x27;amqplib&#x27;);\n\nasync function handleOrderCreated(msg) {\n    const order = JSON.parse(msg.content.toString());\n    try {\n        \/\/ \u6263\u51cf\u5e93\u5b58\n        await db.inventory.decrement(order.productId, order.quantity);\n        \/\/ \u53d1\u5e03\u5e93\u5b58\u6263\u51cf\u6210\u529f\u4e8b\u4ef6\n        channel.publish(&#x27;exchange&#x27;, &#x27;inventory.deducted&#x27;, Buffer.from(JSON.stringify({ orderId: order.id })));\n    } catch (err) {\n        \/\/ \u53d1\u5e03\u5e93\u5b58\u6263\u51cf\u5931\u8d25\u4e8b\u4ef6\uff0c\u89e6\u53d1\u8865\u507f\n        channel.publish(&#x27;exchange&#x27;, &#x27;inventory.deduct.failed&#x27;, Buffer.from(JSON.stringify({ orderId: order.id })));\n    }\n}\n<\/code><\/pre>\n<p><strong>\u8865\u507f\u64cd\u4f5c<\/strong>\uff1a\u5982\u679c\u540e\u7eed\u6b65\u9aa4\u5931\u8d25\uff08\u5982\u652f\u4ed8\u5931\u8d25\uff09\uff0c\u5219\u9700\u53d1\u5e03\u201c\u5e93\u5b58\u8865\u507f\u201d\u4e8b\u4ef6\uff0c\u5e93\u5b58\u670d\u52a1\u76d1\u542c\u540e\u6062\u590d\u5e93\u5b58\u3002<\/p>\n<p><strong>\u4f18\u70b9<\/strong>\uff1a\u677e\u8026\u5408\uff0c\u670d\u52a1\u81ea\u6cbb\u3002 <strong>\u7f3a\u70b9<\/strong>\uff1a\u4e8b\u4ef6\u6d41\u590d\u6742\uff0c\u96be\u4ee5\u8ffd\u8e2a\uff1b\u8865\u507f\u903b\u8f91\u5206\u6563\u3002<\/p>\n<h3>2.2 \u534f\u8c03\u5f0fSaga\uff08\u57fa\u4e8e\u534f\u8c03\u5668\uff09<\/h3>\n<p>\u5f15\u5165\u4e00\u4e2a\u534f\u8c03\u5668\uff08Saga Orchestrator\uff09\u8d1f\u8d23\u53d1\u9001\u6307\u4ee4\u7ed9\u5404\u4e2a\u670d\u52a1\u3002<\/p>\n<h4>\u4ee3\u7801\u793a\u4f8b\uff08Java + Spring Boot\uff09<\/h4>\n<pre><code class=\"language-java\">\n\/\/ SagaOrchestrator.java\n@Component\npublic class SagaOrchestrator {\n    \n    @Autowired\n    private OrderService orderService;\n    @Autowired\n    private InventoryService inventoryService;\n    @Autowired\n    private PaymentService paymentService;\n\n    @Transactional\n    public void createOrderSaga(OrderRequest request) {\n        \/\/ \u6b65\u9aa41\uff1a\u521b\u5efa\u8ba2\u5355\n        Order order = orderService.create(request);\n        try {\n            \/\/ \u6b65\u9aa42\uff1a\u6263\u51cf\u5e93\u5b58\n            inventoryService.deduct(order.getProductId(), order.getQuantity());\n        } catch (Exception e) {\n            \/\/ \u8865\u507f\uff1a\u53d6\u6d88\u8ba2\u5355\n            orderService.cancel(order.getId());\n            throw new SagaException(&quot;\u5e93\u5b58\u4e0d\u8db3&quot;);\n        }\n        try {\n            \/\/ \u6b65\u9aa43\uff1a\u6263\u6b3e\n            paymentService.debit(order.getUserId(), order.getAmount());\n        } catch (Exception e) {\n            \/\/ \u8865\u507f\uff1a\u6062\u590d\u5e93\u5b58 + \u53d6\u6d88\u8ba2\u5355\n            inventoryService.addBack(order.getProductId(), order.getQuantity());\n            orderService.cancel(order.getId());\n            throw new SagaException(&quot;\u6263\u6b3e\u5931\u8d25&quot;);\n        }\n    }\n}\n<\/code><\/pre>\n<p><strong>\u4f18\u70b9<\/strong>\uff1a\u903b\u8f91\u96c6\u4e2d\uff0c\u6613\u4e8e\u7ba1\u7406\u3002 <strong>\u7f3a\u70b9<\/strong>\uff1a\u534f\u8c03\u5668\u53ef\u80fd\u6210\u4e3a\u5355\u70b9\u3002<\/p>\n<h2>3. TCC\u6a21\u5f0f<\/h2>\n<p>TCC\uff08Try-Confirm-Cancel\uff09\u662f\u4e00\u79cd\u8865\u507f\u578b\u4e8b\u52a1\u6a21\u5f0f\uff0c\u5206\u4e3a\u4e09\u4e2a\u9636\u6bb5\uff1a<\/p>\n<ol>\n<li><strong>Try<\/strong>\uff1a\u9884\u7559\u8d44\u6e90\uff08\u5982\u9501\u5b9a\u5e93\u5b58\uff09<\/li>\n<li><strong>Confirm<\/strong>\uff1a\u786e\u8ba4\u6267\u884c\uff08\u5982\u6263\u51cf\u5e93\u5b58\uff09<\/li>\n<li><strong>Cancel<\/strong>\uff1a\u53d6\u6d88\uff08\u91ca\u653e\u9884\u7559\u8d44\u6e90\uff09<\/li>\n<\/ol>\n<h3>\u4ee3\u7801\u793a\u4f8b\uff08Java + Spring Boot\uff09<\/h3>\n<pre><code class=\"language-java\">\n\/\/ InventoryServiceTCC.java\n@Service\npublic class InventoryServiceTCC {\n    \n    @Autowired\n    private InventoryRepository repository;\n\n    \/\/ Try\uff1a\u9884\u7559\u5e93\u5b58\n    @Transactional\n    public boolean tryDeduct(Long productId, Integer quantity, String txId) {\n        \/\/ \u68c0\u67e5\u5e93\u5b58\u662f\u5426\u8db3\u591f\n        Inventory inventory = repository.findByProductId(productId);\n        if (inventory.getAvailable() &lt; quantity) {\n            return false;\n        }\n        \/\/ \u9501\u5b9a\u5e93\u5b58\uff1a\u51cf\u5c11\u53ef\u7528\u5e93\u5b58\uff0c\u589e\u52a0\u9501\u5b9a\u5e93\u5b58\n        inventory.setAvailable(inventory.getAvailable() - quantity);\n        inventory.setLocked(inventory.getLocked() + quantity);\n        repository.save(inventory);\n        \/\/ \u8bb0\u5f55\u4e8b\u52a1\u65e5\u5fd7\n        saveTransactionLog(txId, productId, quantity, &quot;TRY&quot;);\n        return true;\n    }\n\n    \/\/ Confirm\uff1a\u786e\u8ba4\u6263\u51cf\uff08\u771f\u6b63\u6263\u51cf\u9501\u5b9a\u5e93\u5b58\uff09\n    @Transactional\n    public boolean confirmDeduct(String txId) {\n        TransactionLog log = getTransactionLog(txId);\n        if (log == null || log.getStatus() != &quot;TRY&quot;) {\n            return false;\n        }\n        Inventory inventory = repository.findByProductId(log.getProductId());\n        inventory.setLocked(inventory.getLocked() - log.getQuantity());\n        repository.save(inventory);\n        log.setStatus(&quot;CONFIRMED&quot;);\n        updateTransactionLog(log);\n        return true;\n    }\n\n    \/\/ Cancel\uff1a\u53d6\u6d88\u9884\u7559\uff08\u91ca\u653e\u9501\u5b9a\u5e93\u5b58\uff09\n    @Transactional\n    public boolean cancelDeduct(String txId) {\n        TransactionLog log = getTransactionLog(txId);\n        if (log == null || log.getStatus() != &quot;TRY&quot;) {\n            return false;\n        }\n        Inventory inventory = repository.findByProductId(log.getProductId());\n        inventory.setAvailable(inventory.getAvailable() + log.getQuantity());\n        inventory.setLocked(inventory.getLocked() - log.getQuantity());\n        repository.save(inventory);\n        log.setStatus(&quot;CANCELLED&quot;);\n        updateTransactionLog(log);\n        return true;\n    }\n}\n<\/code><\/pre>\n<p><strong>\u6ce8\u610f<\/strong>\uff1aTCC\u9700\u8981\u4e1a\u52a1\u4fb5\u5165\u6027\u5f3a\uff0c\u6bcf\u4e2a\u670d\u52a1\u90fd\u8981\u5b9e\u73b0Try\/Confirm\/Cancel\u63a5\u53e3\u3002\u540c\u65f6\u8981\u4fdd\u8bc1\u5e42\u7b49\u6027\u3002<\/p>\n<p><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a\u77ed\u4e8b\u52a1\uff0c\u5bf9\u4e00\u81f4\u6027\u8981\u6c42\u9ad8\uff08\u5982\u91d1\u878d\uff09\u3002<\/p>\n<h2>4. \u6700\u7ec8\u4e00\u81f4\u6027\uff08\u57fa\u4e8e\u6d88\u606f\u961f\u5217\uff09<\/h2>\n<p>\u5229\u7528\u6d88\u606f\u961f\u5217\uff08\u5982RocketMQ\u3001Kafka\uff09\u5b9e\u73b0\u5f02\u6b65\u786e\u4fdd\u3002\u6838\u5fc3\u601d\u60f3\uff1a\u672c\u5730\u4e8b\u52a1 + \u6d88\u606f\u53d1\u9001\u4fdd\u8bc1\u6700\u7ec8\u4e00\u81f4\u6027\u3002<\/p>\n<h3>\u4ee3\u7801\u793a\u4f8b\uff08Spring Boot + RocketMQ\uff09<\/h3>\n<pre><code class=\"language-java\">\n\/\/ OrderService.java\n@Service\npublic class OrderService {\n    \n    @Autowired\n    private RocketMQTemplate rocketMQTemplate;\n\n    @Transactional\n    public void createOrder(OrderRequest request) {\n        \/\/ 1. \u672c\u5730\u521b\u5efa\u8ba2\u5355\n        Order order = new Order();\n        order.setUserId(request.getUserId());\n        order.setAmount(request.getAmount());\n        order.setStatus(&quot;PENDING&quot;);\n        orderRepository.save(order);\n        \n        \/\/ 2. \u53d1\u9001\u534a\u6d88\u606f\uff08RocketMQ\u4e8b\u52a1\u6d88\u606f\uff09\n        rocketMQTemplate.sendMessageInTransaction(\n            &quot;order-tx-producer&quot;,\n            MessageBuilder.withPayload(order).build(),\n            order\n        );\n    }\n\n    \/\/ \u4e8b\u52a1\u6d88\u606f\u76d1\u542c\u5668\n    @RocketMQTransactionListener(producerGroup = &quot;order-tx-producer&quot;)\n    class OrderTransactionListener implements RocketMQLocalTransactionListener {\n        \n        @Override\n        public RocketMQLocalTransactionState executeLocalTransaction(Message msg, Object arg) {\n            \/\/ \u6267\u884c\u672c\u5730\u4e8b\u52a1\uff08\u6263\u51cf\u5e93\u5b58\u7b49\uff09\n            try {\n                \/\/ \u8fd9\u91cc\u53ef\u4ee5\u8c03\u7528\u5e93\u5b58\u670d\u52a1\uff08\u901a\u8fc7RPC\u6216\u6d88\u606f\uff09\n                inventoryService.deduct(...);\n                return RocketMQLocalTransactionState.COMMIT;\n            } catch (Exception e) {\n                return RocketMQLocalTransactionState.ROLLBACK;\n            }\n        }\n\n        @Override\n        public RocketMQLocalTransactionState checkLocalTransaction(Message msg) {\n            \/\/ \u56de\u67e5\u8ba2\u5355\u72b6\u6001\n            Order order = (Order) msg.getPayload();\n            Order dbOrder = orderRepository.findById(order.getId());\n            if (&quot;SUCCESS&quot;.equals(dbOrder.getStatus())) {\n                return RocketMQLocalTransactionState.COMMIT;\n            } else if (&quot;FAILED&quot;.equals(dbOrder.getStatus())) {\n                return RocketMQLocalTransactionState.ROLLBACK;\n            }\n            return RocketMQLocalTransactionState.UNKNOWN;\n        }\n    }\n}\n<\/code><\/pre>\n<p><strong>\u4f18\u70b9<\/strong>\uff1a\u6027\u80fd\u9ad8\uff0c\u4e1a\u52a1\u89e3\u8026\u3002 <strong>\u7f3a\u70b9<\/strong>\uff1a\u6700\u7ec8\u4e00\u81f4\u6027\u6709\u5ef6\u8fdf\uff1b\u9700\u8981\u5904\u7406\u6d88\u606f\u91cd\u590d\u3002<\/p>\n<h2>5. \u6a21\u5f0f\u5bf9\u6bd4\u4e0e\u9009\u578b<\/h2>\n<p>| \u6a21\u5f0f | \u4e00\u81f4\u6027 | \u6027\u80fd | \u4e1a\u52a1\u4fb5\u5165 | \u9002\u7528\u573a\u666f | |&#8212;&#8212;|&#8212;&#8212;&#8211;|&#8212;&#8212;|&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;-| | Saga\uff08\u7f16\u6392\uff09 | \u6700\u7ec8 | \u9ad8 | \u4f4e | \u957f\u4e8b\u52a1\uff0c\u4e8b\u4ef6\u9a71\u52a8 | | Saga\uff08\u534f\u8c03\uff09 | \u6700\u7ec8 | \u4e2d | \u4e2d | \u590d\u6742\u6d41\u7a0b\u63a7\u5236 | | TCC | \u5f3a\uff08\u51c6\u5b9e\u65f6\uff09 | \u4f4e | \u9ad8 | \u91d1\u878d\u3001\u77ed\u4e8b\u52a1 | | \u6700\u7ec8\u4e00\u81f4\u6027\uff08\u6d88\u606f\uff09 | \u6700\u7ec8 | \u9ad8 | \u4f4e | \u5f02\u6b65\u573a\u666f\uff0c\u5982\u8ba2\u5355 |<\/p>\n<p><strong>\u9009\u578b\u5efa\u8bae<\/strong>\uff1a<\/p>\n<ul>\n<li>\u5982\u679c\u4e1a\u52a1\u5141\u8bb8\u77ed\u6682\u4e0d\u4e00\u81f4\uff0c\u4f18\u5148\u9009\u62e9\u6700\u7ec8\u4e00\u81f4\u6027\uff08\u6d88\u606f\u961f\u5217\uff09\u3002<\/li>\n<li>\u5982\u679c\u5bf9\u4e00\u81f4\u6027\u8981\u6c42\u9ad8\u4e14\u77ed\u4e8b\u52a1\uff0c\u9009TCC\u3002<\/li>\n<li>\u5982\u679c\u4e8b\u52a1\u8de8\u5ea6\u957f\uff0c\u9009Saga\u3002<\/li>\n<\/ul>\n<h2>6. \u6700\u4f73\u5b9e\u8df5<\/h2>\n<ol>\n<li><strong>\u5e42\u7b49\u6027<\/strong>\uff1a\u6240\u6709\u8865\u507f\/\u786e\u8ba4\u64cd\u4f5c\u5fc5\u987b\u5e42\u7b49\u3002<\/li>\n<li><strong>\u4e8b\u52a1\u65e5\u5fd7<\/strong>\uff1a\u8bb0\u5f55\u6bcf\u4e2a\u6b65\u9aa4\u7684\u72b6\u6001\uff0c\u4fbf\u4e8e\u6062\u590d\u3002<\/li>\n<li><strong>\u8d85\u65f6\u5904\u7406<\/strong>\uff1a\u8bbe\u7f6e\u5408\u7406\u7684\u8d85\u65f6\uff0c\u914d\u5408\u91cd\u8bd5\u673a\u5236\u3002<\/li>\n<li><strong>\u76d1\u63a7\u4e0e\u544a\u8b66<\/strong>\uff1a\u76d1\u63a7\u4e8b\u52a1\u6267\u884c\u72b6\u6001\uff0c\u5931\u8d25\u65f6\u53ca\u65f6\u544a\u8b66\u3002<\/li>\n<\/ol>\n<h2>7. \u603b\u7ed3<\/h2>\n<p>\u672c\u6587\u901a\u8fc7\u5b9e\u6218\u4ee3\u7801\u6f14\u793a\u4e86Saga\u3001TCC\u548c\u6700\u7ec8\u4e00\u81f4\u6027\u4e09\u79cd\u5206\u5e03\u5f0f\u4e8b\u52a1\u6a21\u5f0f\u3002\u6ca1\u6709\u94f6\u5f39\uff0c\u9700\u8981\u6839\u636e\u4e1a\u52a1\u573a\u666f\u9009\u62e9\u3002\u5efa\u8bae\u4ece\u7b80\u5355\u7684\u6700\u7ec8\u4e00\u81f4\u6027\u5165\u624b\uff0c\u968f\u7740\u4e1a\u52a1\u590d\u6742\u5ea6\u589e\u52a0\u518d\u8003\u8651Saga\u6216TCC\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u6df1\u5165\u5bf9\u6bd4\u4e09\u79cd\u4e3b\u6d41\u5206\u5e03\u5f0f\u4e8b\u52a1\u6a21\u5f0f\uff1aSaga\u3001TCC\u548c\u6700\u7ec8\u4e00\u81f4\u6027\uff0c\u901a\u8fc7\u771f\u5b9e\u4ee3\u7801\u793a\u4f8b\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u5e2e\u4f60\u7406\u89e3\u9002\u7528\u573a\u666f\u3001\u4f18\u7f3a\u70b9\u53ca\u5b9e\u73b0\u8981\u70b9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[81,82,80,55,83],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-3","category-4","tag-saga","tag-tcc","tag-80","tag-55","tag-83"],"_links":{"self":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186"}],"version-history":[{"count":0,"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts\/186\/revisions"}],"wp:attachment":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}