{"id":1521,"date":"2024-05-30T19:45:11","date_gmt":"2024-05-31T03:45:11","guid":{"rendered":"https:\/\/ligai.cn\/blog\/?p=1521"},"modified":"2024-05-30T19:45:11","modified_gmt":"2024-05-31T03:45:11","slug":"%e6%8a%80%e6%9c%af%e5%88%86%e4%ba%ab-springboot-%e6%b5%81%e5%bc%8f%e8%be%93%e5%87%ba%e6%97%b6%ef%bc%8c%e6%ad%a3%e5%b8%b8%e8%be%93%e5%87%ba%e5%90%8e%e4%b8%ba%e4%bd%95%e7%aa%81%e7%84%b6%e6%8a%a5","status":"publish","type":"post","link":"https:\/\/ligai.cn\/blog\/sharing\/1521.html","title":{"rendered":"\u6280\u672f\u5206\u4eab | SpringBoot \u6d41\u5f0f\u8f93\u51fa\u65f6\uff0c\u6b63\u5e38\u8f93\u51fa\u540e\u4e3a\u4f55\u7a81\u7136\u62a5\u9519\uff1f"},"content":{"rendered":"\n<ol><li>\u4e00\u4e2a SpringBoot \u9879\u76ee\u540c\u65f6\u4f7f\u7528\u4e86 Tomcat \u7684\u8fc7\u6ee4\u5668\u548c Spring \u7684\u62e6\u622a\u5668\uff0c\u4e00\u4e9b\u7ebf\u7a0b\u53d8\u91cf\u5728\u8fc7\u6ee4\u5668\u4e2d\u521d\u59cb\u5316\u5e76\u5728\u62e6\u622a\u5668\u4e2d\u4f7f\u7528\u3002<\/li><li>\u8be5\u9879\u76ee\u9700\u8981\u8c03\u7528\u5927\u8bed\u8a00\u6a21\u578b\u8fdb\u884c\u6d41\u5f0f\u8f93\u51fa\u3002<\/li><li>\u9879\u76ee\u4e2d\uff0c\u7b14\u8005\u4f7f\u7528 SpringBoot \u7684 <code>ResponseEntity&lt;StreamingResponseBody&gt;<\/code> \u5c06\u6d41\u5f0f\u8f93\u51fa\u8fd4\u56de\u524d\u7aef\u3002<\/li><\/ol>\n\n\n\n<h2><strong>\u95ee\u9898\u51fa\u73b0<\/strong><\/h2>\n\n\n\n<p>\u95ee\u9898\u51fa\u73b0\u5728\u4e0a\u8ff0\u7b2c 3 \u70b9\uff1a<strong>\u6b63\u5e38\u8f93\u51fa\u4e00\u6bb5\u5185\u5bb9\u540e\uff0c\u540e\u53f0\u7a81\u7136\u62a5\u9519\uff0c\u800c\u62a5\u9519\u5185\u5bb9\u7531\u62e6\u622a\u5668\u4ea7\u751f<\/strong>\u3002<\/p>\n\n\n\n<p>\u7b14\u8005\u4ed4\u7ec6\u67e5\u770b\u4e86\u62a5\u9519\u65e5\u5fd7\uff0c\u53d1\u73b0\u53ea\u662f\u62e6\u622a\u5668\u7684\u95ee\u9898\uff1a\u6267\u884c\u65f6\u7531\u4e8e\u67d0\u4e9b\u7ebf\u7a0b\u53d8\u91cf\u4e0d\u5b58\u5728\u800c\u62a5\u9519\u3002\u4f46\u662f\uff0c\u8fd9\u4e9b\u7ebf\u7a0b\u53d8\u91cf\u5df2\u7ecf\u5728\u8fc7\u6ee4\u5668\u4e2d\u521d\u59cb\u5316\u4e86\u3002<\/p>\n\n\n\n<p>\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff1a\u4e3a\u4ec0\u4e48\u8fd9\u4e2a\u63a5\u53e3\u660e\u660e\u53ef\u4ee5\u6b63\u5e38\u901a\u8fc7\u8fc7\u6ee4\u5668\u548c\u62e6\u622a\u5668\uff0c\u5e76\u5f00\u59cb\u6b63\u5e38\u8f93\u51fa\uff0c\u5374\u53c8\u7a81\u7136\u5728\u62e6\u622a\u5668\u4e2d\u62a5\u9519\u5462\uff1f<\/p>\n\n\n\n<h2><strong>\u573a\u666f\u91cd\u73b0<\/strong><\/h2>\n\n\n\n<p><strong>Filter<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Slf4j\n@Component\n@Order(1)\npublic class MyFilter implements Filter {\n\n    @Override\n    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {\n        \/\/ \u8981\u7ee7\u7eed\u5904\u7406\u8bf7\u6c42\uff0c\u5fc5\u987b\u6dfb\u52a0 filterChain.doFilter()\n        log.info(\"doFilter method is running..., thread: {}, dispatcherType: {}\", Thread.currentThread(), servletRequest.getDispatcherType()); \n        filterChain.doFilter(servletRequest,servletResponse);\n    } \n}<\/code><\/pre>\n\n\n\n<p><strong>Interceptor<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Slf4j\npublic class MyInterceptor implements HandlerInterceptor {\n\n    @Override\n    public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Object handler) throws Exception {\n        log.info(\"preHandle method is running..., thread: {}, dispatcherType: {}\", Thread.currentThread(), request.getDispatcherType());\n        if (DispatcherType.ASYNC == request.getDispatcherType()) {\n            log.info(\"preHandle dispatcherType={}\", request.getDispatcherType());\n        }\n        return true;\n    }\n\n    @Override\n    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {\n        log.info(\"postHandle method is running..., thread: {}\", Thread.currentThread());\n    }      \n\n    @Override\n    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\n        log.info(\"afterCompletion method is running..., thread: {}\", Thread.currentThread());\n    } \n}<\/code><\/pre>\n\n\n\n<p><strong>WebMvcConfigurer<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Configuration\npublic class WebAppConfigurer implements WebMvcConfigurer {\n\n    @Bean\n    public MyInterceptor myInterceptor() {\n        return new MyInterceptor();\n    }\n\n    @Override\n    public void addInterceptors(InterceptorRegistry registry) {\n        registry.addInterceptor(myInterceptor()).addPathPatterns(\"\/**\");\n    }\n\n    @Override\n    public void configureAsyncSupport(AsyncSupportConfigurer configurer) {\n        configurer.setDefaultTimeout(120_000L);\n        configurer.registerCallableInterceptors();\n        configurer.registerDeferredResultInterceptors();\n\n        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();\n        executor.setCorePoolSize(5);\n        executor.setMaxPoolSize(10);\n        executor.setQueueCapacity(100);\n        executor.setThreadNamePrefix(\"web-async-\");\n        executor.initialize();\n        configurer.setTaskExecutor(executor);\n    }\n}<\/code><\/pre>\n\n\n\n<p><strong>Controller<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Slf4j\n@RestController\n@RequestMapping(\"\/test-stream\")\npublic class TestStreamController {\n\n    @ApiOperation(\"\u6d41\u5f0f\u8f93\u51fa\u793a\u4f8b\")\n    @PostMapping(value = \"\/example\", produces = MediaType.TEXT_EVENT_STREAM_VALUE)\n    public ResponseEntity&lt;StreamingResponseBody&gt; example() {\n        log.info(\"Stream method is running, thread: {}\", Thread.currentThread());\n        return  ResponseEntity.status(HttpStatus.OK)\n            .contentType(new MediaType(MediaType.TEXT_EVENT_STREAM, StandardCharsets.UTF_8))\n            .body(outputStream -&gt; {\n                log.info(\"Internal stream method is running, thread: {}\", Thread.currentThread());\n                try (outputStream) {\n                    String msg = \"To be or not to be!\";\n                    outputStream.write(msg.getBytes(StandardCharsets.UTF_8));\n                    outputStream.flush();\n                }\n            });\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u6839\u636e\u4ee5\u4e0b\u8fd0\u884c\u65e5\u5fd7\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u62e6\u622a\u5668\u7684 <code>preHandle<\/code> \u786e\u5b9e\u6267\u884c\u4e86\u4e24\u6b21\uff0c\u5e76\u4e14\u6b64\u6b21\u8c03\u7528\u8fc7\u7a0b\u5171\u6709 3 \u4e2a\u7ebf\u7a0b\uff08<code>io-14000-exec-1<\/code>\uff0c<code>web-async-1<\/code>\uff0c<code>io-14000-exec-2<\/code>\uff09\u53c2\u4e0e\u4e86\u5de5\u4f5c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>2024-05-06 07:35:27.362  INFO 209108 --- &#91;io-14000-exec-1] o.a.c.c.C.&#91;.&#91;localhost].&#91;\/java-study]    : Initializing Spring DispatcherServlet 'dispatcherServlet'\n2024-05-06 07:35:27.362  INFO 209108 --- &#91;io-14000-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'\n2024-05-06 07:35:27.365  INFO 209108 --- &#91;io-14000-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 3 ms\n2024-05-06 07:35:27.402  INFO 209108 --- &#91;io-14000-exec-1] com.peng.java.study.web.config.MyFilter  : doFilter method is running..., thread: Thread&#91;http-nio-14000-exec-1,5,main], dispatcherType: REQUEST\n2024-05-06 07:35:28.107  INFO 209108 --- &#91;io-14000-exec-1] c.p.java.study.web.config.MyInterceptor  : preHandle method is running..., thread: Thread&#91;http-nio-14000-exec-1,5,main], dispatcherType: REQUEST\n2024-05-06 07:35:28.121  INFO 209108 --- &#91;io-14000-exec-1] c.p.j.s.w.r.test.TestStreamController    : Stream method is running, thread: Thread&#91;http-nio-14000-exec-1,5,main]\n2024-05-06 07:35:28.152  INFO 209108 --- &#91;    web-async-1] c.p.j.s.w.r.test.TestStreamController    : Internal stream method is running, thread: Thread&#91;web-async-1,5,main]\n2024-05-06 07:35:28.167  INFO 209108 --- &#91;io-14000-exec-2] c.p.java.study.web.config.MyInterceptor  : preHandle method is running..., thread: Thread&#91;http-nio-14000-exec-2,5,main], dispatcherType: ASYNC\n2024-05-06 07:35:28.167  INFO 209108 --- &#91;io-14000-exec-2] c.p.java.study.web.config.MyInterceptor  : preHandle dispatcherType=ASYNC\n2024-05-06 07:35:28.174  INFO 209108 --- &#91;io-14000-exec-2] c.p.java.study.web.config.MyInterceptor  : postHandle method is running..., thread: Thread&#91;http-nio-14000-exec-2,5,main]\n2024-05-06 07:35:28.183  INFO 209108 --- &#91;io-14000-exec-2] c.p.java.study.web.config.MyInterceptor  : afterCompletion method is running..., thread: Thread&#91;http-nio-14000-exec-2,5,main]<\/code><\/pre>\n\n\n\n<h2><strong>\u95ee\u9898\u5206\u6790<\/strong><\/h2>\n\n\n\n<p><strong>1. \u65b9\u6cd5\u8c03\u7528\u6d41\u7a0b\u7684\u5dee\u5f02<\/strong><\/p>\n\n\n\n<p>\u4f17\u6240\u5468\u77e5\uff0cSpringBoot \u7684\u666e\u901a\u8f93\u51fa\u63a5\u53e3\u8c03\u7528\u6d41\u7a0b\u56fe\u5982\u56fe 1 \u6240\u793a\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-1-1024x576.png\" alt=\"\" class=\"wp-image-1522\" srcset=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-1-1024x576.png 1024w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-1-300x169.png 300w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-1-768x432.png 768w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-1-1536x864.png 1536w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-1.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption> \u56fe1-SpringBoot \u666e\u901a\u8f93\u51fa\u8c03\u7528\u6d41\u7a0b\u56fe <\/figcaption><\/figure><\/div>\n\n\n\n<p>\u7ed3\u5408\u65e5\u5fd7\uff0c\u6211\u4eec\u53ef\u4ee5\u7b80\u5355\u753b\u51fa\u6d41\u5f0f\u8f93\u51fa\u63a5\u53e3\u5bf9\u5e94\u7684\u6d41\u7a0b\u56fe\uff08\u56fe 2\uff09\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-2-1024x576.png\" alt=\"\" class=\"wp-image-1523\" srcset=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-2-1024x576.png 1024w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-2-300x169.png 300w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-2-768x432.png 768w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-2-1536x864.png 1536w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-2.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption> \u56fe2-SpringBoot \u6d41\u5f0f\u8f93\u51fa\u8c03\u7528\u6d41\u7a0b\u56fe <\/figcaption><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>2. \u7ebf\u7a0b\u7684\u5dee\u5f02<\/strong><\/p>\n\n\n\n<p>\u666e\u901a\u63a5\u53e3\u7684\u6267\u884c\u65f6\u5e8f\u56fe\u5982\u56fe 3 \u6240\u793a\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-3-1024x576.png\" alt=\"\" class=\"wp-image-1524\" srcset=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-3-1024x576.png 1024w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-3-300x169.png 300w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-3-768x432.png 768w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-3-1536x864.png 1536w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-3.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption> \u56fe3-\u666e\u901a\u63a5\u53e3\u7684\u65f6\u5e8f\u56fe <\/figcaption><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u800c\u6d41\u5f0f\u63a5\u53e3\u7684\u65f6\u5e8f\u56fe\u5982\u56fe 4 \u6240\u793a\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-4-1024x576.png\" alt=\"\" class=\"wp-image-1525\" srcset=\"https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-4-1024x576.png 1024w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-4-300x169.png 300w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-4-768x432.png 768w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-4-1536x864.png 1536w, https:\/\/ligai.cn\/blog\/wp-content\/uploads\/2024\/05\/0516-4.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption> \u56fe4-\u6d41\u5f0f\u63a5\u53e3\u7684\u8c03\u7528\u65f6\u5e8f\u56fe <\/figcaption><\/figure><\/div>\n\n\n\n<h2><strong>\u89e3\u51b3\u95ee\u9898<\/strong><\/h2>\n\n\n\n<p>\u901a\u8fc7\u5206\u6790\uff0c\u5bf9\u6d41\u5f0f\u8f93\u51fa\u7684\u60c5\u51b5\u63d0\u51fa\u4e24\u79cd\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n\n\n\n<ol><li><strong>\u5c06\u8fc7\u6ee4\u5668\u4e2d\u7684\u90e8\u5206\u4e1a\u52a1\u903b\u8f91\u8fc1\u79fb\u5230\u62e6\u622a\u5668\u4e2d\u3002<\/strong><\/li><li><strong>\u6839\u636e\u6761\u4ef6\uff0c\u8df3\u8fc7\u7b2c\u4e8c\u6b21\u7684\u62e6\u622a\u5668 preHandle<\/strong> <strong>\u65b9\u6cd5\u3002<\/strong><\/li><\/ol>\n\n\n\n<p>\u7b14\u8005\u9009\u62e9\u4e86\u7b2c\u4e8c\u4e2a\u65b9\u6848\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Slf4j\npublic class MyInterceptor implements HandlerInterceptor {\n\n    @Override\n    public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Object handler) throws Exception {\n        log.info(\"preHandle method is running..., thread: {}, dispatcherType: {}\", Thread.currentThread(), request.getDispatcherType());\n        \/\/ \u5982\u679c\u662f\u5f02\u6b65\u8bf7\u6c42\uff0c\u5219\u8df3\u8fc7\n        if (DispatcherType.ASYNC == request.getDispatcherType()) {\n            log.info(\"preHandle dispatcherType={}\", request.getDispatcherType());\n            return true;\n        }\n        return true;\n    }\n\n    @Override\n    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {\n        log.info(\"postHandle method is running..., thread: {}\", Thread.currentThread());     \n    }\n\n    @Override\n    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\n        log.info(\"afterCompletion method is running..., thread: {}\", Thread.currentThread());\n    } \n}<\/code><\/pre>\n\n\n\n<p>\u9700\u8981\u6ce8\u610f\uff0c\u8bf7\u6c42\u7ebf\u7a0b\u548c\u56de\u8c03\u7ebf\u7a0b\u90fd\u9700\u8003\u8651\u6e05\u7406\u7ebf\u7a0b\u53d8\u91cf\uff0c\u4e0d\u7136\u4f1a\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>><strong>> LigaAI \u5f80\u671f\u7cbe\u5f69\u9605\u8bfb &lt;&lt;<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/ligai.cn\/blog\/alige\/1517.html\">\u7528 MVP(\u6700\u5c0f\u53ef\u884c\u6027\u4ea7\u54c1) \u505a\u4f4e\u6210\u672c\u5feb\u901f\u9a8c\u8bc1\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u7075\u4e86\uff1f<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/ligai.cn\/blog\/%e7%a0%94%e5%8f%91%e7%ae%a1%e7%90%86\/1511.html\">6 \u5927\u539f\u5219\uff01\u52a9\u4f60\u6784\u5efa\u9ad8\u7ee9\u6548\u7684\u7814\u53d1\u5f3a\u519b | Liga\u8bd1\u6587<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/ligai.cn\/blog\/sharing\/1509.html\">\u6280\u672f\u5206\u4eab | \u5f39\u7a97\u5f00\u53d1\u4e2d\uff0c\u5982\u4f55\u4f7f\u7528 Hook \u5c01\u88c5 el-dialog\uff1f<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/ligai.cn\/blog\/team\/1492.html\"><\/a><a href=\"https:\/\/ligai.cn\/blog\/team\/1503.html\">LigaAI x \u6781\u72d0GitLab\uff0c\u5171\u63a2 AI \u65f6\u4ee3\u7814\u53d1\u63d0\u6548\u65b0\u8303\u5f0f<\/a><\/p>\n\n\n\n<p><strong>\u6b22\u8fce\u8bd5\u7528&nbsp;<a href=\"https:\/\/ligai.cn\/\">LigaAI-\u667a\u80fd\u7814\u53d1\u534f\u4f5c\u5e73\u53f0<\/a>\uff0c\u4f53\u9a8c\u667a\u80fd\u7814\u53d1\u534f\u4f5c\uff0c\u4e00\u8d77\u53d8\u5927\u53d8\u5f3a\uff01<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2a SpringBoot \u9879\u76ee\u540c\u65f6\u4f7f\u7528\u4e86 Tomcat \u7684\u8fc7\u6ee4\u5668\u548c Spring \u7684\u62e6\u622a\u5668\uff0c\u4e00\u4e9b\u7ebf\u7a0b\u53d8\u91cf\u5728\u8fc7 &#8230; <a title=\"\u6280\u672f\u5206\u4eab | SpringBoot \u6d41\u5f0f\u8f93\u51fa\u65f6\uff0c\u6b63\u5e38\u8f93\u51fa\u540e\u4e3a\u4f55\u7a81\u7136\u62a5\u9519\uff1f\" class=\"read-more\" href=\"https:\/\/ligai.cn\/blog\/sharing\/1521.html\" aria-label=\"\u7ee7\u7eed\u9605\u8bfb\u6280\u672f\u5206\u4eab | SpringBoot \u6d41\u5f0f\u8f93\u51fa\u65f6\uff0c\u6b63\u5e38\u8f93\u51fa\u540e\u4e3a\u4f55\u7a81\u7136\u62a5\u9519\uff1f\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[15],"_links":{"self":[{"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/posts\/1521"}],"collection":[{"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/comments?post=1521"}],"version-history":[{"count":2,"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/posts\/1521\/revisions"}],"predecessor-version":[{"id":1527,"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/posts\/1521\/revisions\/1527"}],"wp:attachment":[{"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/media?parent=1521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/categories?post=1521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ligai.cn\/blog\/wp-json\/wp\/v2\/tags?post=1521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}