{"id":464,"date":"2021-06-15T20:49:18","date_gmt":"2021-06-15T12:49:18","guid":{"rendered":"http:\/\/moyisuiying.com\/?p=464"},"modified":"2024-05-27T00:00:14","modified_gmt":"2024-05-26T16:00:14","slug":"springboot%e5%a4%84%e7%90%86cors%e8%b7%a8%e5%9f%9f%e8%af%b7%e6%b1%82%e7%9a%84%e4%b8%89%e7%a7%8d%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/moyisuiying.com\/index.php\/javastudy\/springboot\/464.html","title":{"rendered":"Springboot\u5904\u7406CORS\u8de8\u57df\u8bf7\u6c42\u7684\u4e09\u79cd\u65b9\u6cd5"},"content":{"rendered":"\n<h2>\u4e00.<strong>\u524d\u8a00<\/strong><\/h2>\n\n\n\n<p>Springboot\u8de8\u57df\u95ee\u9898\uff0c\u662f\u5f53\u524d\u4e3b\u6d41web\u5f00\u53d1\u4eba\u5458\u90fd\u7ed5\u4e0d\u5f00\u7684\u96be\u9898\u3002\u4f46\u6211\u4eec\u9996\u5148\u8981\u660e\u786e\u4ee5\u4e0b\u51e0\u70b9<\/p>\n\n\n\n<ul><li>\u8de8\u57df\u53ea\u5b58\u5728\u4e8e\u6d4f\u89c8\u5668\u7aef\uff0c\u4e0d\u5b58\u5728\u4e8e\u5b89\u5353\/ios\/Node.js\/python\/ java\u7b49\u5176\u5b83\u73af\u5883<\/li><li>\u8de8\u57df\u8bf7\u6c42\u80fd\u53d1\u51fa\u53bb\uff0c\u670d\u52a1\u7aef\u80fd\u6536\u5230\u8bf7\u6c42\u5e76\u6b63\u5e38\u8fd4\u56de\u7ed3\u679c\uff0c\u53ea\u662f\u7ed3\u679c\u88ab\u6d4f\u89c8\u5668\u62e6\u622a\u4e86\u3002<\/li><li>\u4e4b\u6240\u4ee5\u4f1a\u8de8\u57df\uff0c\u662f\u56e0\u4e3a\u53d7\u5230\u4e86\u540c\u6e90\u7b56\u7565\u7684\u9650\u5236\uff0c\u540c\u6e90\u7b56\u7565\u8981\u6c42\u6e90\u76f8\u540c\u624d\u80fd\u6b63\u5e38\u8fdb\u884c\u901a\u4fe1\uff0c\u5373\u534f\u8bae\u3001\u57df\u540d\u3001\u7aef\u53e3\u53f7\u90fd\u5b8c\u5168\u4e00\u81f4\u3002<\/li><\/ul>\n\n\n\n<p>\u6d4f\u89c8\u5668\u51fa\u4e8e\u5b89\u5168\u7684\u8003\u8651\uff0c\u4f7f\u7528 XMLHttpRequest\u5bf9\u8c61\u53d1\u8d77 HTTP\u8bf7\u6c42\u65f6\u5fc5\u987b\u9075\u5b88\u540c\u6e90\u7b56\u7565\uff0c\u5426\u5219\u5c31\u662f\u8de8\u57df\u7684HTTP\u8bf7\u6c42\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u88ab\u7981\u6b62\u7684\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u6d4f\u89c8\u5668\u5b89\u5168\u7684\u57fa\u77f3\u662f\u540c\u6e90\u7b56\u7565\u3002<\/p>\n\n\n\n<p>\u540c\u6e90\u7b56\u7565\u9650\u5236\u4e86\u4ece\u540c\u4e00\u4e2a\u6e90\u52a0\u8f7d\u7684\u6587\u6863\u6216\u811a\u672c\u5982\u4f55\u4e0e\u6765\u81ea\u53e6\u4e00\u4e2a\u6e90\u7684\u8d44\u6e90\u8fdb\u884c\u4ea4\u4e92\u3002\u8fd9\u662f\u4e00\u4e2a\u7528\u4e8e\u9694\u79bb\u6f5c\u5728\u6076\u610f\u6587\u4ef6\u7684\u91cd\u8981\u5b89\u5168\u673a\u5236\u3002<\/p>\n\n\n\n<p><strong>\u5148\u7ed9\u51fa\u4e00\u4e2a\u719f\u6089\u7684\u62a5\u9519\u4fe1\u606f\uff0c\u8ba9\u4f60\u627e\u5230\u5bb6\u7684\u611f\u89c9~<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img   class=\"lazyload\" data-src=\"https:\/\/gitee.com\/ljf2402901363\/picgo-images\/raw\/master\/typora\/20200609144704100.png\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/moezx\/cdn@3.0.2\/img\/svg\/loader\/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"  alt=\"img\"\/><\/figure >\n<noscript><img src=\"https:\/\/gitee.com\/ljf2402901363\/picgo-images\/raw\/master\/typora\/20200609144704100.png\" alt=\"img\"\/><\/figure><\/noscript>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Access to XMLHttpRequest at '<a href=\"http:\/\/192.168.1.1:8080\/app\/easypoi\/importExcelFile\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/192.168.1.1:8080\/app\/easypoi\/importExcelFile<\/a>' from origin '<a href=\"http:\/\/localhost:8080\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/localhost:8080<\/a>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.<\/p><\/blockquote>\n\n\n\n<h2>\u4e8c.<strong>\u4ec0\u4e48\u662fCROS\uff1f<\/strong><\/h2>\n\n\n\n<p>CORS\u662f\u4e00\u4e2aW3C\u6807\u51c6\uff0c\u5168\u79f0\u662f\u201d\u8de8\u57df\u8d44\u6e90\u5171\u4eab\u201d\uff08Cross-origin resource sharing\uff09\uff0c\u5141\u8bb8\u6d4f\u89c8\u5668\u5411\u8de8\u6e90\u670d\u52a1\u5668\uff0c\u53d1\u51faXMLHttpRequest\u8bf7\u6c42\uff0c\u4ece\u800c\u514b\u670d\u4e86AJAX\u53ea\u80fd\u540c\u6e90\u4f7f\u7528\u7684\u9650\u5236\u3002<\/p>\n\n\n\n<p>\u5b83\u901a\u8fc7\u670d\u52a1\u5668\u589e\u52a0\u4e00\u4e2a\u7279\u6b8a\u7684Header[Access-Control-Allow-Origin]\u6765\u544a\u8bc9\u5ba2\u6237\u7aef\u8de8\u57df\u7684\u9650\u5236\uff0c\u5982\u679c\u6d4f\u89c8\u5668\u652f\u6301CORS\u3001\u5e76\u4e14\u5224\u65adOrigin\u901a\u8fc7\u7684\u8bdd\uff0c\u5c31\u4f1a\u5141\u8bb8XMLHttpRequest\u53d1\u8d77\u8de8\u57df\u8bf7\u6c42\u3002<\/p>\n\n\n\n<p><strong>CORS Header<\/strong><\/p>\n\n\n\n<ul><li>Access-Control-Allow-Origin: <a href=\"http:\/\/www.xxx.com\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/www.xxx.com<\/a><\/li><li>Access-Control-Max-Age\uff1a86400<\/li><li>Access-Control-Allow-Methods\uff1aGET, POST, OPTIONS, PUT, DELETE<\/li><li>Access-Control-Allow-Headers: content-type<\/li><li>Access-Control-Allow-Credentials: true<\/li><\/ul>\n\n\n\n<p>\u542b\u4e49\u89e3\u91ca\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>CORS Header\u5c5e\u6027<\/th><th>\u89e3\u91ca<\/th><\/tr><\/thead><tbody><tr><td>Access-Control-Allow-Origin<\/td><td>\u5141\u8bb8<a href=\"http:\/\/www.xxx.com\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/www.xxx.com<\/a>\u57df\uff08\u81ea\u884c\u8bbe\u7f6e\uff0c\u8fd9\u91cc\u53ea\u505a\u793a\u4f8b\uff09\u53d1\u8d77\u8de8\u57df\u8bf7\u6c42<\/td><\/tr><tr><td>Access-Control-Max-Age<\/td><td>\u8bbe\u7f6e\u572886400\u79d2\u4e0d\u9700\u8981\u518d\u53d1\u9001\u9884\u6821\u9a8c\u8bf7\u6c42<\/td><\/tr><tr><td>Access-Control-Allow-Methods<\/td><td>\u8bbe\u7f6e\u5141\u8bb8\u8de8\u57df\u8bf7\u6c42\u7684\u65b9\u6cd5<\/td><\/tr><tr><td>Access-Control-Allow-Headers<\/td><td>\u5141\u8bb8\u8de8\u57df\u8bf7\u6c42\u5305\u542bcontent-type<\/td><\/tr><tr><td>Access-Control-Allow-Credentials<\/td><td>\u8bbe\u7f6e\u5141\u8bb8Cookie<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2>\u4e09.<strong>SpringBoot\u8de8\u57df\u8bf7\u6c42\u5904\u7406\u65b9\u5f0f<\/strong><\/h2>\n\n\n\n<h3><strong>\u65b9\u6cd5\u4e00\u3001\u76f4\u63a5\u91c7\u7528SpringBoot\u7684\u6ce8\u89e3@CrossOrigin\uff08\u4e5f\u652f\u6301SpringMVC\uff09<\/strong><\/h3>\n\n\n\n<p>\u7b80\u5355\u7c97\u66b4\u7684\u65b9\u5f0f\uff0cController\u5c42\u5728\u9700\u8981\u8de8\u57df\u7684\u7c7b\u6216\u8005\u65b9\u6cd5\u4e0a\u52a0\u4e0a\u8be5\u6ce8\u89e3\u5373\u53ef<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@RestController<br>@CrossOrigin<br>@RequestMapping(\"\/situation\")<br>public class SituationController extends PublicUtilController {<br> &nbsp;<br> &nbsp;@Autowired<br> &nbsp;private SituationService situationService;<br> &nbsp;\/\/ log\u65e5\u5fd7\u4fe1\u606f<br> &nbsp;private static Logger LOGGER = Logger.getLogger(SituationController.class);<br>}<\/pre>\n\n\n\n<h3><strong>\u65b9\u6cd5\u4e8c\u3001\u5904\u7406\u8de8\u57df\u8bf7\u6c42\u7684Configuration<\/strong><\/h3>\n\n\n\n<p>\u589e\u52a0\u4e00\u4e2a\u914d\u7f6e\u7c7b\uff0cCorsConfig.java\u3002\u7ee7\u627fWebMvcConfigurerAdapter\u6216\u8005\u5b9e\u73b0WebMvcConfigurer\u63a5\u53e3\uff0c\u5176\u4ed6\u90fd\u4e0d\u7528\u7ba1\uff0c\u9879\u76ee\u542f\u52a8\u65f6\uff0c\u4f1a\u81ea\u52a8\u8bfb\u53d6\u914d\u7f6e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@Configuration<br>public class CorsConfig implements WebMvcConfigurer {<br> &nbsp; &nbsp;@Override<br> &nbsp; &nbsp;public void addCorsMappings(CorsRegistry registry) {<br> &nbsp; &nbsp; &nbsp; &nbsp;registry.addMapping(\"\/**\").<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;allowedOriginPatterns(\"*\"). \/\/\u5141\u8bb8\u8de8\u57df\u7684\u57df\u540d\uff0c\u53ef\u4ee5\u7528*\u8868\u793a\u5141\u8bb8\u4efb\u4f55\u57df\u540d\u4f7f\u7528<br>\/\/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  allowedOrigins(\"*\"). &nbsp;  \/\/\u5728Springboot2.4\u5bf9\u5e94Spring5.3\u540e\u5728\u8bbe\u7f6eallowCredentials(true)\u7684\u57fa\u7840\u4e0a\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\u901a\u914d\u7b26\u8bbe\u7f6eallowedOrigins\uff0c\u800c\u662f\u9700\u8981\u6307\u5b9a\u7279\u5b9a\u7684URL\u3002\u5982\u679c\u9700\u8981\u8bbe\u7f6e\u901a\u914d\u7b26\uff0c\u9700\u8981\u901a\u8fc7allowedOriginPatterns\u6307\u5b9a<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;allowedMethods(\"GET\", \"POST\", \"DELETE\", \"PUT\") . \/\/\u5141\u8bb8\u4efb\u4f55\u65b9\u6cd5\uff08post\u3001get\u7b49\uff09<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;allowedHeaders(\"*\"). \/\/\u5141\u8bb8\u4efb\u4f55\u8bf7\u6c42\u5934<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;allowCredentials(true). \/\/\u5e26\u4e0acookie\u4fe1\u606f<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exposedHeaders(HttpHeaders.SET_COOKIE).maxAge(3600L); \/\/maxAge(3600)\u8868\u660e\u57283600\u79d2\u5185\uff0c\u4e0d\u9700\u8981\u518d\u53d1\u9001\u9884\u68c0\u9a8c\u8bf7\u6c42\uff0c\u53ef\u4ee5\u7f13\u5b58\u8be5\u7ed3\u679c<br>\u200b<br>\u200b<br> &nbsp;  }<br>\u200b<br>\u200b<br>}<\/pre>\n\n\n\n<h3><strong>\u65b9\u6cd5\u4e09\u3001\u91c7\u7528\u8fc7\u6ee4\u5668\uff08filter\uff09\u7684\u65b9\u5f0f<\/strong><\/h3>\n\n\n\n<p>\u540c\u65b9\u6cd5\u4e8c\u52a0\u914d\u7f6e\u7c7b\uff0c\u589e\u52a0\u4e00\u4e2aCORSFilter \u7c7b\uff0c\u5e76\u5b9e\u73b0Filter\u63a5\u53e3\u5373\u53ef\uff0c\u5176\u4ed6\u90fd\u4e0d\u7528\u7ba1\uff0c\u63a5\u53e3\u8c03\u7528\u65f6\uff0c\u4f1a\u8fc7\u6ee4\u8de8\u57df\u7684\u62e6\u622a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">package com.shiyun.filter;<br>import org.springframework.stereotype.Component;<br>import javax.servlet.*;<br>import javax.servlet.http.HttpServletResponse;<br>import java.io.IOException;<br>\u200b<br>@Component<br>public class CoresFilter implements Filter {<br> &nbsp; &nbsp;@Override<br> &nbsp; &nbsp;public void init(FilterConfig filterConfig) throws ServletException {<br>\u200b<br> &nbsp;  }<br>\u200b<br> &nbsp; &nbsp;@Override<br> &nbsp; &nbsp;public void destroy() {<br>\u200b<br> &nbsp;  }<br>\u200b<br> &nbsp; &nbsp;@Override<br> &nbsp; &nbsp;public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {<br> &nbsp; &nbsp; &nbsp; &nbsp;HttpServletResponse response = (HttpServletResponse) servletResponse;<br> &nbsp; &nbsp; &nbsp; &nbsp;response.setHeader(\"Access-Control-Allow-Origin\", \"*\");<br> &nbsp; &nbsp; &nbsp; &nbsp;response.setHeader(\"Access-Control-Allow-Methods\", \"POST, GET, OPTIONS, DELETE, HEAD\");<br> &nbsp; &nbsp; &nbsp; &nbsp;response.setHeader(\"Access-Control-Max-Age\", \"3600\");<br> &nbsp; &nbsp; &nbsp; &nbsp;response.setHeader(\"Access-Control-Allow-Headers\", \"access-control-allow-origin, authority, content-type, version-info, X-Requested-With\");<br> &nbsp; &nbsp; &nbsp; &nbsp;filterChain.doFilter(servletRequest, servletResponse);<br> &nbsp;  }<br>}<\/pre>\n\n\n\n<h3>\u6216\u8005\u4f7f\u7528CorsConfiguration\u548cUrlBasedCorsConfigurationSource<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">@Configuration<br>public class CorsConfig1 {<br> &nbsp; &nbsp;\/**<br> &nbsp; &nbsp; * @Description :<br> &nbsp; &nbsp; * @Date 11:18 2021\/2\/21 0021<br> &nbsp; &nbsp; * @Param * @param  \uff1a<br> &nbsp; &nbsp; * @return org.springframework.web.cors.CorsConfiguration<br> &nbsp; &nbsp; **\/<br> &nbsp; &nbsp;private CorsConfiguration buildConfig() {<br> &nbsp; &nbsp; &nbsp; &nbsp;CorsConfiguration corsConfiguration = new CorsConfiguration();<br> &nbsp; &nbsp; &nbsp; &nbsp;corsConfiguration.setAllowCredentials(true);<br> &nbsp; &nbsp; &nbsp; &nbsp;\/\/\u5141\u8bb8\u8de8\u57df\u7684\u57df\u540d\uff0c\u53ef\u4ee5\u7528*\u8868\u793a\u5141\u8bb8\u4efb\u4f55\u57df\u540d\u4f7f\u7528,  \u5728Springboot2.4\u5bf9\u5e94Spring5.3\u540e\u5728\u8bbe\u7f6eallowCredentials(true)\u7684\u57fa\u7840\u4e0a\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\u901a\u914d\u7b26\u8bbe\u7f6eallowedOrigins\uff0c\u800c\u662f\u9700\u8981\u6307\u5b9a\u7279\u5b9a\u7684URL\u3002\u5982\u679c\u9700\u8981\u8bbe\u7f6e\u901a\u914d\u7b26\uff0c\u9700\u8981\u901a\u8fc7allowedOriginPatterns\u6307\u5b9a<br> &nbsp; &nbsp; &nbsp; &nbsp;\/\/ &nbsp; &nbsp; &nbsp;  corsConfiguration.addAllowedOrigin(\"*\");<br> &nbsp; &nbsp; &nbsp; &nbsp;corsConfiguration.addAllowedOriginPattern(\"*\");<br> &nbsp; &nbsp; &nbsp; &nbsp;corsConfiguration.addAllowedHeader(\"*\");<br> &nbsp; &nbsp; &nbsp; &nbsp;corsConfiguration.addAllowedMethod(\"*\");<br> &nbsp; &nbsp; &nbsp; &nbsp;return corsConfiguration;<br> &nbsp;  }<br>\u200b<br> &nbsp; &nbsp;\/**<br> &nbsp; &nbsp; * @Description :<br> &nbsp; &nbsp; * @Date 11:19 2021\/2\/21 0021<br> &nbsp; &nbsp; * @Param * @param  \uff1a<br> &nbsp; &nbsp; * @return org.springframework.web.filter.CorsFilter<br> &nbsp; &nbsp; **\/<br> &nbsp; &nbsp;@Bean<br> &nbsp; &nbsp;public CorsFilter corsFilter() {<br> &nbsp; &nbsp; &nbsp; &nbsp;UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();<br> &nbsp; &nbsp; &nbsp; &nbsp;source.registerCorsConfiguration(\"\/**\", buildConfig());<br> &nbsp; &nbsp; &nbsp; &nbsp;return new CorsFilter(source);<br> &nbsp;  }<br>\u200b<br>}<\/pre>\n\n\n\n<h3>\u8fc7\u6ee4\u5668\u8bbe\u7f6e\u6267\u884c\u987a\u5e8f\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u200b<br>\u200b<br>import org.springframework.boot.web.servlet.FilterRegistrationBean;<br>import org.springframework.context.annotation.Bean;<br>import org.springframework.context.annotation.Configuration;<br>import org.springframework.web.cors.CorsConfiguration;<br>import org.springframework.web.cors.UrlBasedCorsConfigurationSource;<br>import org.springframework.web.filter.CorsFilter;<br>\u200b<br>\/**<br> * Classname:CorsFilterConfig<br> *<br> * @description:\u89e3\u51b3\u8de8\u57df\u8bf7\u6c42\u95ee\u9898<br> * @author: \u964c\u610f\u968f\u5f71<br> * @Date: 2021-05-30 01:54<br> * @Version: 1.0<br> **\/<br>@Configuration<br>public class CorsFilterConfig  {<br> &nbsp; &nbsp;\/**<br> &nbsp; &nbsp; * @Description :\u8de8\u57df\u8bbf\u95ee\u8fc7\u6ee4\u5668\uff0c\u8bbe\u7f6e\u6267\u884c\u987a\u5e8f<br> &nbsp; &nbsp; * @Date 19:55 2021\/6\/15 0015<br> &nbsp; &nbsp; * @return org.springframework.boot.web.servlet.FilterRegistrationBean&lt;org.springframework.web.filter.CorsFilter&gt;<br> &nbsp; &nbsp; **\/<br> &nbsp; @Bean<br> &nbsp; &nbsp;public FilterRegistrationBean&lt;CorsFilter&gt; corsFilterRegistrationBean(){<br> &nbsp; &nbsp; &nbsp; &nbsp;UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();<br> &nbsp; &nbsp; &nbsp; &nbsp;CorsConfiguration config = new CorsConfiguration();<br> &nbsp; &nbsp; &nbsp; config.addAllowedOriginPattern(\"*\");<br> &nbsp; &nbsp; &nbsp; config.addAllowedHeader(\"*\");<br> &nbsp; &nbsp; &nbsp; config.addAllowedMethod(\"*\");<br> &nbsp; &nbsp; &nbsp; config.setAllowCredentials(true);<br> &nbsp; &nbsp; &nbsp; &nbsp;source.registerCorsConfiguration(\"\/**\", config); \/\/ CORS \u914d\u7f6e\u5bf9\u6240\u6709\u63a5\u53e3\u90fd\u6709\u6548<br> &nbsp; &nbsp; &nbsp; &nbsp;FilterRegistrationBean&lt;CorsFilter&gt; bean = new FilterRegistrationBean&lt;&gt;(new CorsFilter(source));<br> &nbsp; &nbsp; &nbsp; &nbsp;\/\/\u8bbe\u7f6e\u6267\u884c\u987a\u5e8f\uff0c\u6570\u5b57\u8d8a\u5c0f\u8d8a\u5148\u6267\u884c<br> &nbsp; &nbsp; &nbsp; &nbsp;bean.setOrder(0);<br> &nbsp; &nbsp; &nbsp; &nbsp;return bean;<br> &nbsp;  }<br>}<br>\u200b<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00.\u524d\u8a00 Springboot\u8de8\u57df\u95ee\u9898\uff0c\u662f\u5f53\u524d\u4e3b\u6d41web\u5f00\u53d1\u4eba\u5458\u90fd\u7ed5\u4e0d\u5f00\u7684\u96be\u9898\u3002\u4f46\u6211\u4eec\u9996\u5148\u8981\u660e\u786e\u4ee5\u4e0b\u51e0\u70b9 \u8de8\u57df\u53ea\u5b58\u5728\u4e8e\u6d4f\u89c8\u5668\u7aef\uff0c\u4e0d &#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[202],"tags":[200,148,65,201],"_links":{"self":[{"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/posts\/464"}],"collection":[{"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/comments?post=464"}],"version-history":[{"count":1,"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/posts\/464\/revisions"}],"predecessor-version":[{"id":465,"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/posts\/464\/revisions\/465"}],"wp:attachment":[{"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/media?parent=464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/categories?post=464"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/moyisuiying.com\/index.php\/wp-json\/wp\/v2\/tags?post=464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}