{"id":10020464,"date":"2024-12-12T12:13:18","date_gmt":"2024-12-12T04:13:18","guid":{"rendered":"https:\/\/itmax.cn\/?p=10020464"},"modified":"2024-12-12T12:13:18","modified_gmt":"2024-12-12T04:13:18","slug":"spring-%e5%ba%94%e7%94%a8%e5%90%88%e5%b9%b6%e4%b9%8b%e8%b7%af%ef%bc%88%e4%ba%8c%ef%bc%89%ef%bc%9a%e5%b3%b0%e5%9b%9e%e8%b7%af%e8%bd%ac%ef%bc%8c%e6%9f%b3%e6%9a%97%e8%8a%b1%e6%98%8e","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10020464","title":{"rendered":"Spring \u5e94\u7528\u5408\u5e76\u4e4b\u8def\uff08\u4e8c\uff09\uff1a\u5cf0\u56de\u8def\u8f6c\uff0c\u67f3\u6697\u82b1\u660e"},"content":{"rendered":"<p>\u4f5c\u8005\uff1a\u4eac\u4e1c\u79d1\u6280 \u674e\u541b <\/p>\n<p>\u4e66\u63a5\u4e0a\u6587\uff0c\u524d\u9762\u5728 <a href=\"https:\/\/link.segmentfault.com\/?enc=A89YJdcuxh%2Bi3sT9YQ0OrQ%3D%3D.c2kODIyNd0cWMkDd1rP5SVrmc96zHYzNHxXPWiP121%2BOLlDQsJkDis7x1E7kKc53jFOQd%2FiGvFII6Fu6kQmHY7FQJJMWTSj%2BQHp6i7Op37Q%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Spring \u5e94\u7528\u5408\u5e76\u4e4b\u8def\uff08\u4e00\uff09\uff1a\u6478\u77f3\u5934\u8fc7\u6cb3<\/a> \u4ecb\u7ecd\u4e86\u51e0\u79cd\u4e0d\u6210\u529f\u7684\u7ecf\u9a8c\uff0c\u4e0b\u9762\u7ee7\u7eed\u6298\u817e\u2026<\/p>\n<\/p>\n<h2>\u56db\u3001\u4ed3\u5e93\u5408\u5e76\uff0c\u72ec\u7acb\u5bb9\u5668<\/h2>\n<p>\u5728\u7ecf\u5386\u4e86\u4e0a\u9762\u7684\u5c1d\u8bd5\uff0c\u5728\u540c\u4e8b\u4e3a\u5565\u4e0d\u641e\u4e24\u4e2a\u72ec\u7acb\u7684\u5bb9\u5668\u63d0\u9192\u4e0b\uff0c\u51b3\u5b9a\u629b\u5f00 Spring Boot \u5185\u7f6e\u7684\u7236\u5b50\u5bb9\u5668\u65b9\u6848\uff0c\u5b8c\u5168\u81ea\u5df1\u5b9e\u73b0\u7236\u5b50\u5bb9\u5668\u3002<\/p>\n<h3>\u5982\u4f55\u52a0\u8f7d <code>web<\/code> \u9879\u76ee\uff1f<\/h3>\n<p>\u73b0\u5728\u7684\u96be\u9898\u53ea\u6709\u4e00\u4e2a\uff1a\u5982\u4f55\u52a0\u8f7d <code>web<\/code> \u9879\u76ee\uff1f\u52a0\u8f7d\u5b8c\u6210\u540e\uff0c\u5982\u4f55\u6301\u7eed\u6301\u6709 <code>web<\/code> \u9879\u76ee\uff1f\u7ecf\u8fc7\u601d\u8003\u540e\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a <code>boot<\/code> \u9879\u76ee\u7684 Spring Bean\uff0c\u5728\u8be5 Bean \u4e2d\u52a0\u8f7d\u5e76\u6301\u6709 <code>web<\/code> \u9879\u76ee\u7684\u5bb9\u5668\u3002\u7531\u4e8e Spring Bean \u9ed8\u8ba4\u662f\u5355\u4f8b\u7684\uff0c\u5e76\u4e14\u4f1a\u4f34\u968f Spring \u5bb9\u5668\u957f\u671f\u5b58\u6d3b\uff0c\u5c31\u53ef\u4ee5\u4fdd\u8bc1 <code>web<\/code> \u5bb9\u5668\u6301\u4e45\u5b58\u6d3b\u3002\u7ed3\u5408 <a href=\"https:\/\/link.segmentfault.com\/?enc=WhGly8GyqIRcktOz3RWErg%3D%3D.YL3yO0EkbaGprBykLCu5%2BZEzD8af8%2FCXGwr2kmdbbzd9%2FzzKPoNEK6L15vQkpJy5OZMnP6%2BtVgenjhvqob12tw%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Spring \u6269\u5c55\u70b9\u6982\u89c8\u53ca\u5b9e\u8df5<\/a> \u4e2d\u4ecb\u7ecd\u7684 Spring \u6269\u5c55\u70b9\uff0c\u6709\u4e24\u4e2a\u5730\u65b9\u53ef\u4ee5\u5229\u7528\uff1a<\/p>\n<\/p>\n<p>1.\u53ef\u4ee5\u5229\u7528 ApplicationContextAware \u83b7\u53d6 boot \u5bb9\u5668\u7684 ApplicationContext \u5b9e\u4f8b\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5b9e\u73b0\u81ea\u5df1\u5b9e\u73b0\u7684\u7236\u5b50\u5bb9\u5668\uff1b<\/p>\n<p>2.\u53ef\u4ee5\u5229\u7528 ApplicationListener \u83b7\u53d6 ContextRefreshedEvent \u4e8b\u4ef6\uff0c\u8be5\u4e8b\u4ef6\u8868\u793a\u5bb9\u5668\u5df2\u7ecf\u5b8c\u6210\u521d\u59cb\u5316\uff0c\u53ef\u4ee5\u63d0\u4f9b\u670d\u52a1\u3002\u5728\u76d1\u542c\u5230\u8be5\u4e8b\u4ef6\u540e\uff0c\u6765\u8fdb\u884c web \u5bb9\u5668\u7684\u52a0\u8f7d\u3002<\/p>\n<\/p>\n<p>\u601d\u8def\u786e\u5b9a\u540e\uff0c\u4ee3\u7801\u5b9e\u73b0\u5c31\u5f88\u7b80\u5355\u4e86\uff1a<\/p>\n<\/p>\n<pre><code>package com.diguage.demo.boot.config;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.beans.BeansException;\nimport org.springframework.context.ApplicationContext;\nimport org.springframework.context.ApplicationContextAware;\nimport org.springframework.context.ApplicationEvent;\nimport org.springframework.context.ApplicationListener;\nimport org.springframework.context.event.ContextRefreshedEvent;\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\nimport org.springframework.stereotype.Component;\n\n\/**\n * @author D\u74dc\u54e5 \u00b7 https:\/\/www.diguage.com\n *\/\n@Component\npublic class WebLoaderListener implements ApplicationContextAware,\n        ApplicationListener&lt;ApplicationEvent&gt; {\n    private static final Logger logger = LoggerFactory.getLogger(WebLoaderListener.class);\n\n    \/**\n     * \u7236\u5bb9\u5668\uff0c\u52a0\u8f7d boot \u9879\u76ee\n     *\/\n    private static ApplicationContext parentContext;\n\n    \/**\n     * \u5b50\u5bb9\u5668\uff0c\u52a0\u8f7d web \u9879\u76ee\n     *\/\n    private static ApplicationContext childContext;\n\n    @Override\n    public void setApplicationContext(ApplicationContext ctx) throws BeansException {\n        WebLoaderListener.parentContext = ctx;\n    }\n\n    @Override\n    public void onApplicationEvent(ApplicationEvent event) {\n        logger.info(&quot;receive application event: {}&quot;, event);\n        if (event instanceof ContextRefreshedEvent) {\n            WebLoaderListener.childContext = new ClassPathXmlApplicationContext(\n                    new String[]{&quot;classpath:web\/spring-cfg.xml&quot;},\n                    WebLoaderListener.parentContext);\n        }\n    }\n}<\/code><\/pre>\n<h3>\u5bb9\u5668\u91cd\u590d\u52a0\u8f7d\u7684\u95ee\u9898<\/h3>\n<p>\u8fd9\u6b21\u81ea\u5df1\u5b9e\u73b0\u7684\u7236\u5b50\u5bb9\u5668\uff0c\u5982\u540c\u8bbe\u60f3\u7684\u90a3\u6837\uff0c\u6ca1\u6709\u540c\u540d Bean \u7684\u68c0\u67e5\uff0c\u7701\u53bb\u4e86\u5f88\u591a\u9ebb\u70e6\u3002\u4f46\u662f\uff0c\u89c2\u5bdf\u65e5\u5fd7\uff0c\u4f1a\u53d1\u73b0 <code>com.diguage.demo.boot.config.WebLoaderListener#onApplicationEvent<\/code> \u65b9\u6cd5\u88ab\u4e24\u6b21\u6267\u884c\uff0c\u4e5f\u5c31\u662f\u76d1\u542c\u5230\u4e86\u4e24\u6b21 <code>ContextRefreshedEvent<\/code> \u4e8b\u4ef6\uff0c\u5bfc\u81f4 <code>web<\/code> \u5bb9\u5668\u4f1a\u88ab\u52a0\u8f7d\u4e24\u6b21\u3002\u7531\u4e8e\u9879\u76ee\u7684 RPC \u670d\u52a1\u4e0d\u80fd\u91cd\u590d\u6ce8\u518c\uff0c\u7b2c\u4e8c\u6b21\u52a0\u8f7d\u629b\u51fa\u5f02\u5e38\uff0c\u5bfc\u81f4\u542f\u52a8\u5931\u8d25\u3002<\/p>\n<p>\u6700\u521d\uff0c\u6000\u7591\u662f <code>web<\/code> \u5bb9\u5668\uff0c\u52a0\u8f7d\u4e86 <code>WebLoaderListener<\/code>\uff0c\u4f46\u662f\u8ddf\u8e2a\u4ee3\u7801\uff0c\u6ca1\u6709\u53d1\u73b0 <code>childContext<\/code> \u5bb9\u5668\u4e2d\u6709 <code>WebLoaderListener<\/code> \u7684\u76f8\u5173 Bean\u3002<\/p>\n<p>\u6628\u5929\u505a\u4e86\u4e2a\u5c0f\u5b9e\u9a8c\uff0c\u53c8\u8c03\u8bd5\u4e86\u4e00\u4e0b Spring \u7684\u6e90\u4ee3\u7801\uff0c\u53d1\u73b0\u4e86\u5176\u4e2d\u7684\u5965\u79d8\u3002\u76f4\u63a5\u8d34\u4ee3\u7801\u5427\uff1a<\/p>\n<p>SPRING\/spring-context\/src\/main\/java\/org\/springframework\/context\/support\/AbstractApplicationContext.java<\/p>\n<\/p>\n<pre><code>\/**\n * Publish the given event to all listeners.\n * &lt;p&gt;This is the internal delegate that all other {@code publishEvent}\n * methods refer to. It is not meant to be called directly but rather serves\n * as a propagation mechanism between application contexts in a hierarchy,\n * potentially overridden in subclasses for a custom propagation arrangement.\n * @param event the event to publish (may be an {@link ApplicationEvent}\n * or a payload object to be turned into a {@link PayloadApplicationEvent})\n * @param typeHint the resolved event type, if known.\n * The implementation of this method also tolerates a payload type hint for\n * a payload object to be turned into a {@link PayloadApplicationEvent}.\n * However, the recommended way is to construct an actual event object via\n * {@link PayloadApplicationEvent#PayloadApplicationEvent(Object, Object, ResolvableType)}\n * instead for such scenarios.\n * @since 4.2\n * @see ApplicationEventMulticaster#multicastEvent(ApplicationEvent, ResolvableType)\n *\/\nprotected void publishEvent(Object event, @Nullable ResolvableType typeHint) {\n    Assert.notNull(event, &quot;Event must not be null&quot;);\n    ResolvableType eventType = null;\n\n    \/\/ Decorate event as an ApplicationEvent if necessary\n    ApplicationEvent applicationEvent;\n    if (event instanceof ApplicationEvent applEvent) {\n        applicationEvent = applEvent;\n        eventType = typeHint;\n    }\n    else {\n        ResolvableType payloadType = null;\n        if (typeHint != null &amp;&amp; ApplicationEvent.class.isAssignableFrom(typeHint.toClass())) {\n            eventType = typeHint;\n        }\n        else {\n            payloadType = typeHint;\n        }\n        applicationEvent = new PayloadApplicationEvent&lt;&gt;(this, event, payloadType);\n    }\n\n    \/\/ Determine event type only once (for multicast and parent publish)\n    if (eventType == null) {\n        eventType = ResolvableType.forInstance(applicationEvent);\n        if (typeHint == null) {\n            typeHint = eventType;\n        }\n    }\n\n    \/\/ Multicast right now if possible - or lazily once the multicaster is initialized\n    if (this.earlyApplicationEvents != null) {\n        this.earlyApplicationEvents.add(applicationEvent);\n    }\n    else if (this.applicationEventMulticaster != null) {\n        this.applicationEventMulticaster.multicastEvent(applicationEvent, eventType);\n    }\n\n    \/\/ Publish event via parent context as well...\n    \/\/ \u5982\u679c\u6709\u7236\u5bb9\u5668\uff0c\u5219\u4e5f\u5c06\u4e8b\u4ef6\u53d1\u5e03\u7ed9\u7236\u5bb9\u5668\u3002\n    if (this.parent != null) {\n        if (this.parent instanceof AbstractApplicationContext abstractApplicationContext) {\n            abstractApplicationContext.publishEvent(event, typeHint);\n        }\n        else {\n            this.parent.publishEvent(event);\n        }\n    }\n}<\/code><\/pre>\n<p>\u5728 <code>publishEvent<\/code> \u65b9\u6cd5\u7684\u6700\u540e\uff0c\u5982\u679c\u7236\u5bb9\u5668\u4e0d\u4e3a <code>null<\/code> \u7684\u60c5\u51b5\u4e0b\uff0c\u5219\u4e5f\u4f1a\u5411\u7236\u5bb9\u5668\u5e7f\u64ad\u5bb9\u5668\u7684\u76f8\u5173\u4e8b\u4ef6\u3002<\/p>\n<p>\u770b\u5230\u8fd9\u91cc\u5c31\u6e05\u695a\u4e86\uff0c\u4e0d\u662f <code>web<\/code> \u5bb9\u5668\u6301\u6709\u4e86 <code>WebLoaderListener<\/code> \u8fd9\u4e2a Bean\uff0c\u800c\u662f <code>web<\/code> \u5bb9\u5668\u4e3b\u52a8\u5411\u7236\u5bb9\u5668\u5e7f\u64ad\u4e86 <code>ContextRefreshedEvent<\/code> \u4e8b\u4ef6\u3002<\/p>\n<h3>\u5bb9\u5668\u9500\u6bc1<\/h3>\n<p>\u9664\u4e86\u4e0a\u8ff0\u95ee\u9898\uff0c\u8fd8\u6709\u4e00\u4e2a\u95ee\u9898\u9700\u8981\u601d\u8003\uff1a\u5982\u4f55\u9500\u6bc1 <code>web<\/code> \u5bb9\u5668\uff1f\u5982\u679c\u4e0d\u80fd\u9500\u6bc1\u5bb9\u5668\uff0c\u4f1a\u6709\u4e00\u4e9b\u610f\u60f3\u4e0d\u5230\u7684\u95ee\u9898\u3002\u6bd4\u5982\uff0c\u6ce8\u518c\u4e2d\u5fc3\u7684 RPC \u63d0\u4f9b\u65b9\u4e0d\u80fd\u53ca\u65f6\u9500\u6bc1\u7b49\u7b49\u3002<\/p>\n<p>\u8fd9\u91cc\u7684\u89e3\u51b3\u65b9\u6848\u4e5f\u6bd4\u8f83\u7b80\u5355\uff1a\u540c\u6837\u57fa\u4e8e\u4e8b\u4ef6\u76d1\u542c\uff0cSpring \u5bb9\u5668\u9500\u6bc1\u4f1a\u6709 <code>ContextClosedEvent<\/code> \u4e8b\u4ef6\uff0c\u5728 <code>WebLoaderListener<\/code> \u4e2d\u76d1\u542c\u8be5\u4e8b\u4ef6\uff0c\u7136\u540e\u8c03\u7528 <code>AbstractApplicationContext#close<\/code> \u65b9\u6cd5\u5c31\u53ef\u4ee5\u5b8c\u6210 Spring \u5bb9\u5668\u7684\u9500\u6bc1\u5de5\u4f5c\u3002<\/p>\n<h3>\u7236\u5b50\u5bb9\u5668\u52a0\u8f7d\u53ca\u9500\u6bc1<\/h3>\n<p>\u7ed3\u5408\u4e0a\u9762\u7684\u6240\u6709\u8bba\u8ff0\uff0c\u5b8c\u6574\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<pre><code>package com.diguage.demo.boot.config;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.beans.BeansException;\nimport org.springframework.context.ApplicationContext;\nimport org.springframework.context.ApplicationContextAware;\nimport org.springframework.context.ApplicationEvent;\nimport org.springframework.context.ApplicationListener;\nimport org.springframework.context.event.ContextClosedEvent;\nimport org.springframework.context.event.ContextRefreshedEvent;\nimport org.springframework.context.support.AbstractApplicationContext;\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\nimport org.springframework.stereotype.Component;\n\nimport java.util.Objects;\n\n\/**\n * \u57fa\u4e8e\u4e8b\u4ef6\u76d1\u542c\u7684 web \u9879\u76ee\u52a0\u8f7d\u5668\n *\n * @author D\u74dc\u54e5 \u00b7 https:\/\/www.diguage.com\n *\/\n@Component\npublic class WebLoaderListener implements ApplicationContextAware,\n        ApplicationListener&lt;ApplicationEvent&gt; {\n    private static final Logger logger = LoggerFactory.getLogger(WebLoaderListener.class);\n\n    \/**\n     * \u7236\u5bb9\u5668\uff0c\u52a0\u8f7d boot \u9879\u76ee\n     *\/\n    private static ApplicationContext parentContext;\n\n    \/**\n     * \u5b50\u5bb9\u5668\uff0c\u52a0\u8f7d web \u9879\u76ee\n     *\/\n    private static ClassPathXmlApplicationContext childContext;\n\n    @Override\n    public void setApplicationContext(ApplicationContext ctx) throws BeansException {\n        WebLoaderListener.parentContext = ctx;\n    }\n\n    \/**\n     * \u4e8b\u4ef6\u76d1\u542c\n     *\n     * @author D\u74dc\u54e5 \u00b7 https:\/\/www.diguage.com\n     *\/\n    @Override\n    public void onApplicationEvent(ApplicationEvent event) {\n        logger.info(&quot;receive application event: {}&quot;, event);\n        if (event instanceof ContextRefreshedEvent refreshedEvent) {\n            ApplicationContext context = refreshedEvent.getApplicationContext();\n            if (Objects.equals(WebLoaderListener.parentContext, context)) {\n                \/\/ \u52a0\u8f7d web \u5bb9\u5668\n                WebLoaderListener.childContext = new ClassPathXmlApplicationContext(\n                        new String[]{&quot;classpath:web\/spring-cfg.xml&quot;},\n                        WebLoaderListener.parentContext);\n            }\n        } else if (event instanceof ContextClosedEvent) {\n            \/\/ \u5904\u7406\u5bb9\u5668\u9500\u6bc1\u4e8b\u4ef6\n            if (Objects.nonNull(WebLoaderListener.childContext)) {\n                synchronized (WebLoaderListener.class) {\n                    if (Objects.nonNull(WebLoaderListener.childContext)) {\n                        AbstractApplicationContext ctx = WebLoaderListener.childContext;\n                        WebLoaderListener.childContext = null;\n                        ctx.close();\n                    }\n                }\n            }\n        }\n    }\n}<\/code><\/pre>\n<h2><\/h2>\n<h2>\u4e94\u3001\u53c2\u8003\u8d44\u6599<\/h2>\n<p>1.<a href=\"https:\/\/link.segmentfault.com\/?enc=PovVdYwnsTlQSSXYdJzRJg%3D%3D.J9i1VQaVOfJXGKba4V%2FON6WWvDCo8KwcPgd0i%2FcbGbxUe5AKzYjPlBnM73sa5N%2BMM%2FkPB3rcfD6Kh9MkgVkMqQ%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Spring \u6269\u5c55\u70b9\u6982\u89c8\u53ca\u5b9e\u8df5 &#8211; &#8220;\u5730\u74dc\u54e5&#8221;\u535a\u5ba2\u7f51<\/a><\/p>\n<p>2.<a href=\"https:\/\/link.segmentfault.com\/?enc=ZzQRxFx1PGqxaWxsKefl4g%3D%3D.TeWvq7VnJn4sYFUKKADa1UHYZQfByG7dyQ%2Fsjq3aQZRZozqULuzbc2kZCk4mRG2WfwJAiAHJC1QCDVhenuOLhg%3D%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">Context Hierarchy with the Spring Boot Fluent Builder API<\/a><\/p>\n<p>3.<a href=\"https:\/\/link.segmentfault.com\/?enc=hPMf4fAYBEut9Q6dv6cmsw%3D%3D.H6fXa9k4zXc6mFaJl%2B1XuA8uqjoWwQh0aJxrbvogkPpmC9SFDbero4rRdPK%2FzFQlhP8AQXJ%2BKdv9CyFhTdFhkScSF2aVXh%2FSGrGRvqqvVkU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">How to revert initial git commit?<\/a><\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000045591765\">https:\/\/segmentfault.com\/a\/1190000045591765<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u4eac\u4e1c\u79d1\u6280 \u674e\u541b \u4e66\u63a5\u4e0a\u6587\uff0c\u524d\u9762\u5728 Spring \u5e94\u7528\u5408\u5e76\u4e4b\u8def\uff08\u4e00\uff09\uff1a\u6478\u77f3\u5934\u8fc7\u6cb3 \u4ecb\u7ecd\u4e86\u51e0\u79cd\u4e0d\u6210\u529f\u7684\u7ecf\u9a8c\uff0c [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10020464","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020464","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"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10020464"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020464\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10020464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10020464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10020464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}