{"id":10008086,"date":"2023-07-13T10:58:46","date_gmt":"2023-07-13T02:58:46","guid":{"rendered":"https:\/\/ityet.com\/?p=10008086"},"modified":"2023-07-13T10:58:46","modified_gmt":"2023-07-13T02:58:46","slug":"%e7%94%a8-spring-%e7%ae%a1%e7%90%86-controller%ef%bc%8c%e4%bd%a0%e8%a7%89%e5%be%97%e5%8f%af%e8%a1%8c%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10008086","title":{"rendered":"\u7528 Spring \u7ba1\u7406 Controller\uff0c\u4f60\u89c9\u5f97\u53ef\u884c\u5417\uff1f"},"content":{"rendered":"<p><a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=uaOyVC%2Fn6ha%2B7XGaEwqP2A%3D%3D.bqu19Ve4Z0UvHVql1hcSllUBtCvK9u7ULCaz5txgGwA%2BRmd7LHEYe8ydOskfZ7QY47ZHVlCcXgc0dRoqWSwSzQ%3D%3D\" rel=\"noopener noreferrer\">\u4e0a\u7bc7\u6587\u7ae0<\/a>\u548c\u5c0f\u4f19\u4f34\u4eec\u804a\u4e86 Spring \u5bb9\u5668\u4e2d\u7684\u7236\u5b50\u5bb9\u5668\u95ee\u9898\uff0c\u4e5f\u548c\u5c0f\u4f19\u4f34\u4eec\u68b3\u7406\u4e86 Spring \u5bb9\u5668\u548c SpringMVC \u5bb9\u5668\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u5176\u4e2d\uff0cSpring \u5bb9\u5668\u662f\u7236\u5bb9\u5668\uff0cSpringMVC \u662f\u5b50\u5bb9\u5668\uff0c\u5b50\u5bb9\u5668\u53ef\u4ee5\u8bbf\u95ee\u7236\u5bb9\u5668\u4e2d\u7684 Bean\uff0c\u4f46\u662f\u7236\u5bb9\u5668\u65e0\u6cd5\u8bbf\u95ee\u5b50\u5bb9\u5668\u4e2d\u7684 Bean\u3002<\/p>\n<p>\u5728\u4e00\u4e2a SSM \u9879\u76ee\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5355\u7eaf\u4f7f\u7528 SpringMVC \u5bb9\u5668\uff0c\u8fd9\u4e2a\u6ca1\u95ee\u9898\uff0c\u9879\u76ee\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u3002\u4f46\u662f\uff0c\u6709\u7684\u5c0f\u4f19\u4f34\u53ef\u80fd\u8981\u95ee\u4e86\uff0c\u5982\u679c\u628a\u6240\u6709\u7684 Bean \u90fd\u626b\u63cf\u5230 Spring \u5bb9\u5668\u4e2d\u884c\u4e0d\u884c\uff1f<\/p>\n<p>\u5148\u6765\u8bf4\u7ed3\u8bba\uff1a\u53ef\u4ee5\uff01\u4f46\u662f\u9700\u8981\u989d\u5916\u914d\u7f6e\u3002<\/p>\n<p>\u9605\u8bfb\u672c\u6587\u9700\u8981\u5148\u4e86\u89e3 Spring \u5bb9\u5668\u7684\u7236\u5b50\u5bb9\u5668\u54e6\uff0c\u5982\u679c\u8fd8\u4e0d\u4e86\u89e3\u7684\u8bdd\u5efa\u8bae\u5148\u9605\u8bfb<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=lt%2FWYiEX94QndTDbl%2Bm86Q%3D%3D.nd9BkSV%2FXTA4hk9CVUX8nrP7938gjzqg2V6dIJqZ7Zi5pOv%2FrQgCI6chvgAy1nvSQ5RwsO9CnXM1k4K%2FLM10rA%3D%3D\" rel=\"noopener noreferrer\">\u4e0a\u7bc7\u6587\u7ae0<\/a>\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u628a\u6240\u6709 Bean \u90fd\u6ce8\u518c\u5230 Spring \u5bb9\u5668\u4e2d\u5462\uff1f\u6309\u7167\u6211\u4eec<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=CtYq5ktbf1bC%2FPjc9Ce9YQ%3D%3D.GUV5f%2FJ3lAbhMtvovc4Cz%2B2slLnd0p8fevQlGtzgKhZUneUrgPV97i8BrbX3MWVj%2FFtZkXHn%2Fs6B8KBJ%2FtpV7g%3D%3D\" rel=\"noopener noreferrer\">\u4e0a\u7bc7\u6587\u7ae0<\/a>\u4e2d\u7684\u5206\u6790\uff0c\u6240\u6709 Bean \u90fd\u6ce8\u518c\u5230 Spring \u5bb9\u5668\u4e4b\u540e\uff0cSpring \u5bb9\u5668\u4f5c\u4e3a\u7236\u5bb9\u5668\uff0cSpringMVC \u4f5c\u4e3a\u5b50\u5bb9\u5668\uff0c\u6309\u7406\u8bf4\uff0c\u7531\u4e8e\u5b50\u5bb9\u5668\u53ef\u4ee5\u8bbf\u95ee\u7236\u5bb9\u5668\u4e2d\u7684 Bean\uff0c\u6240\u4ee5 SpringMVC \u662f\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee Spring \u5bb9\u5668\u4e2d\u7684 Bean \u7684\uff0c\u6240\u4ee5\uff0c\u4f3c\u4e4e\u628a\u6240\u6709\u7684 Bean \u90fd\u626b\u63cf\u5230 Spring \u5bb9\u5668\u5e94\u8be5\u662f\u6ca1\u6709\u95ee\u9898\u7684\uff1f<\/p>\n<p>\u5176\u5b9e\u4e0d\u7136\uff01<\/p>\n<p>\u95ee\u9898\u5c31\u51fa\u5728 SpringMVC \u5bb9\u5668\u67e5\u627e Controller \u7684\u65b9\u5f0f\u4e0a\uff0cSpringMVC \u5bb9\u5668\u67e5\u627e Controller\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u5728\u5f53\u524d\u5bb9\u5668\u4e2d\u67e5\u627e\uff0c\u5e76\u4e0d\u4f1a\u53bb\u7236\u5bb9\u5668\u4e2d\u67e5\u627e\uff0c\u6240\u4ee5\u5982\u679c\u628a Controller \u90fd\u626b\u63cf\u5230\u7236\u5bb9\u5668\u7684\u8bdd\uff0c\u5bf9\u4e8e SpringMVC \u6765\u8bf4\uff0c\u76f8\u5f53\u4e8e\u7cfb\u7edf\u4e2d\u5c31\u6ca1\u6709 Controller \u4e86\uff0c\u6240\u4ee5\u4f60\u4e00\u8bbf\u95ee\uff0c\u76f4\u63a5\u5c31 404 \u4e86\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u7ed3\u5408\u6e90\u7801\u548c\u5c0f\u4f19\u4f34\u4eec\u5206\u6790\u4e00\u4e0b\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5c0f\u4f19\u4f34\u4eec\u77e5\u9053\uff0c\u5728 SpringMVC \u4e2d\uff0c\u5f53\u8bf7\u6c42\u5230\u8fbe\u670d\u52a1\u7aef\u4e4b\u540e\uff0c\u9700\u8981\u7531\u5904\u7406\u5668\u6620\u5c04\u5668 HandlerMapping \u6765\u786e\u5b9a\u8fd9\u4e2a\u8bf7\u6c42\u5e94\u8be5\u7531\u54ea\u4e2a\u5904\u7406\u5668\u6765\u5904\u7406\uff0c\u6240\u4ee5\uff0c\u6309\u7406\u8bf4\uff0cHandlerMapping \u4e2d\u5c31\u4f1a\u8bb0\u5f55\u6240\u6709\u7684\u5904\u7406\u5668\u4fe1\u606f\uff0c\u4e5f\u5c31\u662f Controller \u7684\u4fe1\u606f\u3002\u4e00\u822c\u6211\u4eec\u5728 SpringMVC \u4e2d\u4f7f\u7528\u7684 HandlerMapping \u90fd\u662f RequestMappingHandlerMapping\uff0c\u6240\u4ee5\u8fd9\u91cc\u6211\u4eec\u5c31\u901a\u8fc7 RequestMappingHandlerMapping \u7684\u521d\u59cb\u5316\u6765\u770b\u4e00\u4e0b\uff0cSpringMVC \u5230\u5e95\u662f\u5982\u4f55\u67e5\u627e Controller \u7684\u3002<\/p>\n<p>\u5728 RequestMappingHandlerMapping#afterPropertiesSet \u65b9\u6cd5\u4e2d\uff0c\u8c03\u7528\u4e86\u7236\u7c7b\u7684 afterPropertiesSet \u65b9\u6cd5\uff0c\u6211\u4eec\u6765\u770b\u4e0b\uff1a<\/p>\n<p>AbstractHandlerMethodMapping#afterPropertiesSet\uff1a<\/p>\n<pre><code class=\"java\">@Override\npublic void afterPropertiesSet() {\n    initHandlerMethods();\n}\nprotected void initHandlerMethods() {\n    for (String beanName : getCandidateBeanNames()) {\n        if (!beanName.startsWith(SCOPED_TARGET_NAME_PREFIX)) {\n            processCandidateBean(beanName);\n        }\n    }\n    handlerMethodsInitialized(getHandlerMethods());\n}<\/code><\/pre>\n<p>initHandlerMethods \u65b9\u6cd5\u5c31\u662f\u521d\u59cb\u5316\u5904\u7406\u5668\u7684\u65b9\u6cd5\uff0c\u4e5f\u5c31\u662f\u5728\u8fd9\u4e2a\u65b9\u6cd5\u4e2d\uff0c\u53bb\u5c1d\u8bd5\u627e\u5230\u6240\u6709\u7684 Controller\uff0c\u5e76\u4e14\u628a\u6bcf\u4e00\u4e2a\u63a5\u53e3\u65b9\u6cd5\u90fd\u5c01\u88c5\u6210 HandlerMethod \u5bf9\u8c61\u3002<\/p>\n<p>\u6211\u4eec\u6765\u770b\u4e0b getCandidateBeanNames \u65b9\u6cd5\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u7528\u6765\u627e\u5230\u6240\u6709\u7684\u5019\u9009\u7684 Bean\uff1a<\/p>\n<pre><code class=\"java\">protected String[] getCandidateBeanNames() {\n    return (this.detectHandlerMethodsInAncestorContexts ?\n            BeanFactoryUtils.beanNamesForTypeIncludingAncestors(obtainApplicationContext(), Object.class) :\n            obtainApplicationContext().getBeanNamesForType(Object.class));\n}<\/code><\/pre>\n<p>\u5173\u952e\u70b9\u5c31\u5728\u8fd9\u4e86\uff0c\u8fd9\u91cc\u9996\u5148\u53bb\u5224\u65ad detectHandlerMethodsInAncestorContexts \u53d8\u91cf\u7684\u503c\uff0c\u5982\u679c\u8fd9\u4e2a\u53d8\u91cf\u4e3a true\uff0c\u5219\u8c03\u7528 BeanFactoryUtils.beanNamesForTypeIncludingAncestors \u65b9\u6cd5\u53bb\u67e5\u8be2 Bean\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u5728<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=qpp6GS0bdg9MATPnq8qzXQ%3D%3D.3pbZWMy0ZxapWbXvrTz7yDOlReQbyW051Rv9DXkjyloBLhDNuS%2FWrzY4qeSFijFnQlturkAgw5RMiQa51M1LTg%3D%3D\" rel=\"noopener noreferrer\">\u4e0a\u7bc7\u6587\u7ae0<\/a>\u4e2d\u677e\u54e5\u548c\u5927\u5bb6\u5206\u4eab\u8fc7\uff0c\u7528\u6765\u67e5\u627e Bean \u7684\u540d\u79f0\uff0c\u5305\u62ec\u7236\u5bb9\u5668\u4e2d\u7684 Bean \u90fd\u4f1a\u67e5\u627e\u5230\u5e76\u8fd4\u56de\uff1b\u5982\u679c detectHandlerMethodsInAncestorContexts \u53d8\u91cf\u4e3a false\uff0c\u5219\u8c03\u7528 getBeanNamesForType \u65b9\u6cd5\u53bb\u67e5\u627e Bean\uff0cgetBeanNamesForType \u65b9\u6cd5\u6211\u4eec<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=JLxHGRVD330Bn%2BrWZPj9Cw%3D%3D.thPGZsNSsHtQxqthhFnm5Xc%2FbTG8BxlBwSNcZ47xShG5nilYKBQU2Cux%2Bn8c6efU2J5Pfkn0eFVgbZYhtvK2KQ%3D%3D\" rel=\"noopener noreferrer\">\u4e0a\u7bc7\u6587\u7ae0<\/a>\u4e5f\u8bb2\u8fc7\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u53ea\u627e\u5f53\u524d\u5bb9\u5668\u7684 Bean\uff0c\u4e0d\u4f1a\u53bb\u7236\u5bb9\u5668\u4e2d\u67e5\u627e\u3002<\/p>\n<p>\u6240\u4ee5\u73b0\u5728\u95ee\u9898\u7684\u5173\u952e\u5c31\u5728\u4e8e detectHandlerMethodsInAncestorContexts \u53d8\u91cf\u4e86\uff0c\u8fd9\u4e2a\u53d8\u91cf\u9ed8\u8ba4\u662f false\uff0c<strong>\u5373\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u53bb\u5f53\u524d\u5bb9\u5668\uff08SpringMVC \u5bb9\u5668\uff09\u67e5\u627e Bean\u3002<\/strong><\/p>\n<p>\u8fd9\u91cc\u627e\u5230\u7684 beanName \u662f\u5f53\u524d\u5bb9\u5668\u4e2d\u6240\u6709\u7684 beanName\uff0c\u6240\u4ee5\u63a5\u4e0b\u6765\u8fd8\u8981\u53bb processCandidateBean \u65b9\u6cd5\u8d70\u4e00\u5708\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u4f1a\u53bb\u5224\u65ad\u8fd9\u4e2a Bean \u662f\u5426\u662f\u4e00\u4e2a Controller\uff0c\u5982\u679c\u662f\u5c31\u5c06\u4e4b\u6536\u96c6\u5230\u4e00\u8d77\uff1a<\/p>\n<pre><code class=\"java\">protected void processCandidateBean(String beanName) {\n    Class&lt;?&gt; beanType = null;\n    beanType = obtainApplicationContext().getType(beanName);\n    if (beanType != null &amp;&amp; isHandler(beanType)) {\n        detectHandlerMethods(beanName);\n    }\n}\n@Override\nprotected boolean isHandler(Class&lt;?&gt; beanType) {\n    return AnnotatedElementUtils.hasAnnotation(beanType, Controller.class);\n}<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u53ea\u6709\u8fd9\u7c7b\u4e0a\u6709 <code>@Controller<\/code> \u6ce8\u89e3\uff0c\u8fd9\u4e2a\u7c7b\u624d\u4f1a\u88ab\u7559\u4e0b\u6765\u3002<\/p>\n<p>\u597d\u5566\uff0c\u5269\u4e0b\u7684\u903b\u8f91\u6211\u4eec\u5c31\u4e0d\u770b\u4e86\u3002<\/p>\n<p>\u73b0\u5728\u5927\u5bb6\u5df2\u7ecf\u4e86\u89e3\u5230\u8fd9\u6837\u4e00\u4e2a\u60c5\u51b5\uff1a<\/p>\n<p>SpringMVC \u5bb9\u5668\u5728\u521d\u59cb\u5316 HandlerMapping \u7684\u65f6\u5019\uff0c\u4f1a\u53bb\u67e5\u627e\u6240\u6709\u7684 Controller \u5e76\u5b8c\u6210\u521d\u59cb\u5316\uff0c\u4f46\u662f\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u4f1a\u53bb\u5f53\u524d\u5bb9\u5668\u4e2d\u67e5\u627e\uff0c\u5e76\u4e0d\u4f1a\u53bb\u7236\u5bb9\u5668\u4e2d\u67e5\u627e\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u5982\u679c\u628a Controller \u8ba9 Spring \u5bb9\u5668\u626b\u63cf\u5e76\u7ba1\u7406\uff0c\u90a3\u4e48\u5c31\u4f1a\u5bfc\u81f4\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cSpringMVC \u5bb9\u5668\u627e\u4e0d\u5230 Controller\uff0c\u8fdb\u800c\u5bfc\u81f4\u6240\u6709\u7684\u8bf7\u6c42 404\u3002<\/p>\n<p>\u5728\u524d\u9762\u7684\u8bb2\u89e3\u4e2d\uff0c\u677e\u54e5\u90fd\u5f3a\u8c03\u4e86<strong>\u9ed8\u8ba4\u60c5\u51b5<\/strong>\uff0c\u610f\u601d\u5c31\u662f\u8bf4\u8fd9\u4e2a\u4e8b\u60c5\u8fd8\u6709\u8f6c\u571c\u7684\u4f59\u5730\uff0c\u770b\u4e86\u524d\u9762\u6e90\u7801\u7684\u5c0f\u4f19\u4f34\u5e94\u8be5\u4e5f\u53d1\u73b0\u4e86\uff0c\u53ea\u8981\u6211\u4eec\u628a detectHandlerMethodsInAncestorContexts \u53d8\u91cf\u6539\u4e3a true\uff0c\u90a3\u4e48 HandlerMapping \u5c31\u4f1a\u53bb\u7236\u5bb9\u5668\u4e2d\u67e5\u627e Bean\uff0c\u8fd9\u6837\u5373\u4f7f\u88ab Spring \u5bb9\u5668\u626b\u63cf\u5e76\u7ba1\u7406\u7684 Bean\uff0c\u4e5f\u5c31\u80fd\u591f\u67e5\u627e\u5230\u4e86\u3002<\/p>\n<p>\u4fee\u6539\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>spring-servlet.xml\uff1a<\/p>\n<pre><code class=\"xml\">&lt;bean class=&quot;org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping&quot;&gt;\n    &lt;property name=&quot;detectHandlerMethodsInAncestorContexts&quot; value=&quot;true&quot;\/&gt;\n&lt;\/bean&gt;<\/code><\/pre>\n<p>\u5728 Spring \u5bb9\u5668\u4e2d\u76f4\u63a5\u626b\u63cf\u6240\u6709 Bean\uff1a<\/p>\n<pre><code class=\"xml\">&lt;context:component-scan base-package=&quot;org.javaboy.web&quot;\/&gt;<\/code><\/pre>\n<p>web.xml \u4e2d\u52a0\u8f7d\u8fd9\u4e24\u4e2a\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"xml\">&lt;context-param&gt;\n    &lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;\n    &lt;param-value&gt;classpath:applicationContext.xml&lt;\/param-value&gt;\n&lt;\/context-param&gt;\n&lt;listener&gt;\n    &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;\/listener-class&gt;\n&lt;\/listener&gt;\n&lt;servlet&gt;\n    &lt;servlet-name&gt;springmvc&lt;\/servlet-name&gt;\n    &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;\/servlet-class&gt;\n    &lt;init-param&gt;\n        &lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;\n        &lt;param-value&gt;classpath:spring-servlet.xml&lt;\/param-value&gt;\n    &lt;\/init-param&gt;\n&lt;\/servlet&gt;\n&lt;servlet-mapping&gt;\n    &lt;servlet-name&gt;springmvc&lt;\/servlet-name&gt;\n    &lt;url-pattern&gt;\/&lt;\/url-pattern&gt;\n&lt;\/servlet-mapping&gt;<\/code><\/pre>\n<p>\u8fd9\u6837\u914d\u7f6e\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u628a\u6240\u6709 Bean \u90fd\u626b\u63cf\u5230 Spring \u5bb9\u5668\u4e2d\u4e86\u3002<\/p>\n<p>\u597d\u5566\uff0c\u4eca\u5929\u8fd9\u7bc7\u6587\u7ae0<strong>\u76ee\u7684\u4e0d\u662f\u4e3a\u4e86\u8ba9\u5c0f\u4f19\u4f34\u4eec\u53bb\u5728 Spring \u5bb9\u5668\u4e2d\u7ba1\u7406 Controller\uff0c\u53ea\u662f\u60f3\u501f\u8fd9\u6837\u4e00\u4e2a\u5951\u673a\uff0c\u4e00\u8d77\u6765\u634b\u4e00\u634b SpringMVC \u4e2d HanderMapping \u7684\u539f\u7406\u3002<\/strong><\/p>\n<p>\u5982\u679c\u611f\u89c9\u672c\u6587\u9605\u8bfb\u6709\u70b9\u5403\u529b\uff0c\u53ef\u4ee5\u5148\u770b\u770b<a target=\"_blank\" href=\"https:\/\/link.segmentfault.com\/?enc=Y5pdCN%2FQRjHjvxsA56bZTA%3D%3D.Z5C%2F8ydXl1MGKgFJPqFEZe27g0OO0jn3YwLqPj72%2F7buUz0enfmfMTm5yd%2B3SPcSaVgel5tav%2FqI28Lkf%2FC6dQ%3D%3D\" rel=\"noopener noreferrer\">\u4e0a\u7bc7\u6587\u7ae0<\/a>\u54e6<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000044004723\">https:\/\/segmentfault.com\/a\/1190000044004723<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u7bc7\u6587\u7ae0\u548c\u5c0f\u4f19\u4f34\u4eec\u804a\u4e86 Spring \u5bb9\u5668\u4e2d\u7684\u7236\u5b50\u5bb9\u5668\u95ee\u9898\uff0c\u4e5f\u548c\u5c0f\u4f19\u4f34\u4eec\u68b3\u7406\u4e86 Spring \u5bb9\u5668\u548c Spri [&hellip;]<\/p>\n","protected":false},"author":1,"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-10008086","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\/10008086","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10008086"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10008086\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10008086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10008086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10008086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}