{"id":211,"date":"2015-04-13T11:43:36","date_gmt":"2015-04-13T03:43:36","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=211"},"modified":"2015-04-18T16:44:49","modified_gmt":"2015-04-18T08:44:49","slug":"java%e5%88%9b%e5%bb%ba%e7%ba%bf%e7%a8%8brunnable%e6%8e%a5%e5%8f%a3%e5%92%8cthread%e7%b1%bb","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=211","title":{"rendered":"Java\u521b\u5efa\u7ebf\u7a0b(Runnable\u63a5\u53e3\u548cThread\u7c7b)"},"content":{"rendered":"<p>\u5927\u591a\u6570\u60c5\u51b5\uff0c\u901a\u8fc7\u5b9e\u4f8b\u5316\u4e00\u4e2aThread\u5bf9\u8c61\u6765\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\u3002<br \/>\nJava\u5b9a\u4e49\u4e86\u4e24\u79cd\u65b9\u5f0f\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\uff1a<br \/>\n<!--more--><\/p>\n<p>\u5b9e\u73b0Runnable \u63a5\u53e3\uff1b<br \/>\n\u53ef\u4ee5\u7ee7\u627fThread\u7c7b\u3002<\/p>\n<p>\u4e0b\u9762\u7684\u4e24\u5c0f\u8282\u4f9d\u6b21\u4ecb\u7ecd\u4e86\u6bcf\u4e00\u79cd\u65b9\u5f0f\u3002<br \/>\n\u5b9e\u73b0Runnable\u63a5\u53e3<\/p>\n<p>\u521b\u5efa\u7ebf\u7a0b\u7684\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\u521b\u5efa\u4e00\u4e2a\u5b9e\u73b0Runnable \u63a5\u53e3\u7684\u7c7b\u3002Runnable\u62bd\u8c61\u4e86\u4e00\u4e2a\u6267\u884c\u4ee3\u7801\u5355\u5143\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u5b9e\u73b0Runnable\u63a5\u53e3\u7684\u65b9\u6cd5\u521b\u5efa\u6bcf\u4e00\u4e2a\u5bf9\u8c61\u7684\u7ebf\u7a0b\u3002\u4e3a\u5b9e\u73b0Runnable \u63a5\u53e3\uff0c\u4e00\u4e2a\u7c7b\u4ec5\u9700\u5b9e\u73b0\u4e00\u4e2arun()\u7684\u7b80\u5355\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u58f0\u660e\u5982\u4e0b\uff1a<br \/>\n\u00a0\u00a0\u00a0 public void run( )<br \/>\n\u5728run()\u4e2d\u53ef\u4ee5\u5b9a\u4e49\u4ee3\u7801\u6765\u6784\u5efa\u65b0\u7684\u7ebf\u7a0b\u3002\u7406\u89e3\u4e0b\u9762\u5185\u5bb9\u662f\u81f3\u5173\u91cd\u8981\u7684\uff1arun()\u65b9\u6cd5\u80fd\u591f\u50cf\u4e3b\u7ebf\u7a0b\u90a3\u6837\u8c03\u7528\u5176\u4ed6\u65b9\u6cd5\uff0c\u5f15\u7528\u5176\u4ed6\u7c7b\uff0c\u58f0\u660e\u53d8\u91cf\u3002\u4ec5\u6709\u7684\u4e0d\u540c\u662frun()\u5728\u7a0b\u5e8f\u4e2d\u786e\u7acb\u53e6\u4e00\u4e2a\u5e76\u53d1\u7684\u7ebf\u7a0b\u6267\u884c\u5165\u53e3\u3002\u5f53run()\u8fd4\u56de\u65f6\uff0c\u8be5\u7ebf\u7a0b\u7ed3\u675f\u3002<\/p>\n<p>\u5728\u4f60\u5df2\u7ecf\u521b\u5efa\u4e86\u5b9e\u73b0Runnable\u63a5\u53e3\u7684\u7c7b\u4ee5\u540e\uff0c\u4f60\u8981\u5728\u7c7b\u5185\u90e8\u5b9e\u4f8b\u5316\u4e00\u4e2aThread\u7c7b\u7684\u5bf9\u8c61\u3002Thread \u7c7b\u5b9a\u4e49\u4e86\u597d\u51e0\u79cd\u6784\u9020\u51fd\u6570\u3002\u6211\u4eec\u4f1a\u7528\u5230\u7684\u5982\u4e0b\uff1a<br \/>\n\u00a0\u00a0\u00a0 Thread(Runnable threadOb, String threadName)<br \/>\n\u8be5\u6784\u9020\u51fd\u6570\u4e2d\uff0cthreadOb\u662f\u4e00\u4e2a\u5b9e\u73b0Runnable\u63a5\u53e3\u7c7b\u7684\u5b9e\u4f8b\u3002\u8fd9\u5b9a\u4e49\u4e86\u7ebf\u7a0b\u6267\u884c\u7684\u8d77\u70b9\u3002\u65b0\u7ebf\u7a0b\u7684\u540d\u79f0\u7531threadName\u5b9a\u4e49\u3002<\/p>\n<p>\u5efa\u7acb\u65b0\u7684\u7ebf\u7a0b\u540e\uff0c\u5b83\u5e76\u4e0d\u8fd0\u884c\u76f4\u5230\u8c03\u7528\u4e86\u5b83\u7684start()\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u5728Thread \u7c7b\u4e2d\u5b9a\u4e49\u3002\u672c\u8d28\u4e0a\uff0cstart() \u6267\u884c\u7684\u662f\u4e00\u4e2a\u5bf9run()\u7684\u8c03\u7528\u3002 Start\uff08\uff09\u65b9\u6cd5\u58f0\u660e\u5982\u4e0b\uff1a<br \/>\n\u00a0\u00a0\u00a0 void start( )<\/p>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7ebf\u7a0b\u5e76\u542f\u52a8\u5b83\u8fd0\u884c\uff1a<br \/>\n[java]\/\/ Create a second thread.<br \/>\nclass NewThread implements Runnable {<br \/>\n\u00a0\u00a0\u00a0 Thread t;<br \/>\n\u00a0\u00a0\u00a0 NewThread() {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Create a new, second thread<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 t = new Thread(this, &quot;Demo Thread&quot;);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Child thread: &quot; + t);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 t.start(); \/\/ Start the thread<br \/>\n\u00a0\u00a0\u00a0 }<\/p>\n<p>\u00a0\u00a0\u00a0 \/\/ This is the entry point for the second thread.<br \/>\n\u00a0\u00a0\u00a0 public void run() {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for(int i = 5; i &gt; 0; i&#8211;) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Child Thread: &quot; + i);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Thread.sleep(500);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } catch (InterruptedException e) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Child interrupted.&quot;);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Exiting child thread.&quot;);<br \/>\n\u00a0\u00a0\u00a0 }<br \/>\n}<\/p>\n<p>class ThreadDemo {<br \/>\n\u00a0\u00a0\u00a0 public static void main(String args[]) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 new NewThread(); \/\/ create a new thread<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for(int i = 5; i &gt; 0; i&#8211;) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Main Thread: &quot; + i);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Thread.sleep(1000);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } catch (InterruptedException e) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Main thread interrupted.&quot;);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Main thread exiting.&quot;);<br \/>\n\u00a0\u00a0\u00a0 }<br \/>\n}[\/java]<br \/>\n\u5728NewThread \u6784\u9020\u51fd\u6570\u4e2d\uff0c\u65b0\u7684Thread\u5bf9\u8c61\u7531\u4e0b\u9762\u7684\u8bed\u53e5\u521b\u5efa\uff1a:<br \/>\n\u00a0\u00a0\u00a0 t = new Thread(this, &#8220;Demo Thread&#8221;);<br \/>\n\u901a\u8fc7\u524d\u9762\u7684\u8bed\u53e5this \u8868\u660e\u5728this\u5bf9\u8c61\u4e2d\u4f60\u60f3\u8981\u65b0\u7684\u7ebf\u7a0b\u8c03\u7528run()\u65b9\u6cd5\u3002\u7136\u540e\uff0cstart() \u88ab\u8c03\u7528\uff0c\u4ee5run()\u65b9\u6cd5\u4e3a\u5f00\u59cb\u542f\u52a8\u4e86\u7ebf\u7a0b\u7684\u6267\u884c\u3002\u8fd9\u4f7f\u5b50\u7ebf\u7a0bfor \u5faa\u73af\u5f00\u59cb\u6267\u884c\u3002\u8c03\u7528start()\u4e4b\u540e\uff0cNewThread \u7684\u6784\u9020\u51fd\u6570\u8fd4\u56de\u5230main()\u3002\u5f53\u4e3b\u7ebf\u7a0b\u88ab\u6062\u590d\uff0c\u5b83\u5230\u8fbefor \u5faa\u73af\u3002\u4e24\u4e2a\u7ebf\u7a0b\u7ee7\u7eed\u8fd0\u884c\uff0c\u5171\u4eabCPU\uff0c\u76f4\u5230\u5b83\u4eec\u7684\u5faa\u73af\u7ed3\u675f\u3002\u8be5\u7a0b\u5e8f\u7684\u8f93\u51fa\u5982\u4e0b\uff1a<br \/>\nChild thread: Thread[Demo Thread,5,main]<br \/>\nMain Thread: 5<br \/>\nChild Thread: 5<br \/>\nChild Thread: 4<br \/>\nMain Thread: 4<br \/>\nChild Thread: 3<br \/>\nChild Thread: 2<br \/>\nMain Thread: 3<br \/>\nChild Thread: 1<br \/>\nExiting child thread.<br \/>\nMain Thread: 2<br \/>\nMain Thread: 1<br \/>\nMain thread exiting.<\/p>\n<p>\u5982\u524d\u9762\u63d0\u5230\u7684\uff0c\u5728\u591a\u7ebf\u7a0b\u7a0b\u5e8f\u4e2d\uff0c\u901a\u5e38\u4e3b\u7ebf\u7a0b\u5fc5\u987b\u662f\u7ed3\u675f\u8fd0\u884c\u7684\u6700\u540e\u4e00\u4e2a\u7ebf\u7a0b\u3002\u5b9e\u9645\u4e0a\uff0c\u4e00\u4e9b\u8001\u7684JVM\uff0c\u5982\u679c\u4e3b\u7ebf\u7a0b\u5148\u4e8e\u5b50\u7ebf\u7a0b\u7ed3\u675f\uff0cJava\u7684\u8fd0\u884c\u65f6\u95f4\u7cfb\u7edf\u5c31\u53ef\u80fd\u201c\u6302\u8d77\u201d\u3002\u524d\u8ff0\u7a0b\u5e8f\u4fdd\u8bc1\u4e86\u4e3b\u7ebf\u7a0b\u6700\u540e\u7ed3\u675f\uff0c\u56e0\u4e3a\u4e3b\u7ebf\u7a0b\u6c89\u7761\u5468\u671f1000\u6beb\u79d2\uff0c\u800c\u5b50\u7ebf\u7a0b\u4ec5\u4e3a500\u6beb\u79d2\u3002\u8fd9\u5c31\u4f7f\u5b50\u7ebf\u7a0b\u5728\u4e3b\u7ebf\u7a0b\u7ed3\u675f\u4e4b\u524d\u5148\u7ed3\u675f\u3002\u7b80\u800c\u8a00\u4e4b\uff0c\u4f60\u5c06\u770b\u5230\u7b49\u5f85\u7ebf\u7a0b\u7ed3\u675f\u7684\u66f4\u597d\u9014\u5f84\u3002<br \/>\n\u6269\u5c55Thread<\/p>\n<p>\u521b\u5efa\u7ebf\u7a0b\u7684\u53e6\u4e00\u4e2a\u9014\u5f84\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u7c7b\u6765\u6269\u5c55Thread\u7c7b\uff0c\u7136\u540e\u521b\u5efa\u8be5\u7c7b\u7684\u5b9e\u4f8b\u3002\u5f53\u4e00\u4e2a\u7c7b\u7ee7\u627fThread\u65f6\uff0c\u5b83\u5fc5\u987b\u91cd\u8f7drun()\u65b9\u6cd5\uff0c\u8fd9\u4e2arun()\u65b9\u6cd5\u662f\u65b0\u7ebf\u7a0b\u7684\u5165\u53e3\u3002\u5b83\u4e5f\u5fc5\u987b\u8c03\u7528start()\u65b9\u6cd5\u53bb\u542f\u52a8\u65b0\u7ebf\u7a0b\u6267\u884c\u3002\u4e0b\u9762\u7528\u6269\u5c55thread\u7c7b\u91cd\u5199\u524d\u9762\u7684\u7a0b\u5e8f\uff1a<br \/>\n[java]\/\/ Create a second thread by extending Thread<br \/>\nclass NewThread extends Thread {<br \/>\n\u00a0\u00a0\u00a0 NewThread() {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Create a new, second thread<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 super(&quot;Demo Thread&quot;);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Child thread: &quot; + this);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 start(); \/\/ Start the thread<br \/>\n\u00a0\u00a0\u00a0 }<\/p>\n<p>\u00a0\u00a0\u00a0 \/\/ This is the entry point for the second thread.<br \/>\n\u00a0\u00a0\u00a0 public void run() {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for(int i = 5; i &gt; 0; i&#8211;) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Child Thread: &quot; + i);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Thread.sleep(500);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } catch (InterruptedException e) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Child interrupted.&quot;);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Exiting child thread.&quot;);<br \/>\n\u00a0\u00a0\u00a0 }<br \/>\n}<\/p>\n<p>class ExtendThread {<br \/>\n\u00a0\u00a0\u00a0 public static void main(String args[]) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 new NewThread(); \/\/ create a new thread<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for(int i = 5; i &gt; 0; i&#8211;) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Main Thread: &quot; + i);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Thread.sleep(1000);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } catch (InterruptedException e) {<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Main thread interrupted.&quot;);<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(&quot;Main thread exiting.&quot;);<br \/>\n\u00a0\u00a0\u00a0 }<br \/>\n}<br \/>\n[\/java]<br \/>\n\u8be5\u7a0b\u5e8f\u751f\u6210\u548c\u524d\u8ff0\u7248\u672c\u76f8\u540c\u7684\u8f93\u51fa\u3002\u5b50\u7ebf\u7a0b\u662f\u7531\u5b9e\u4f8b\u5316NewThread\u5bf9\u8c61\u751f\u6210\u7684\uff0c\u8be5\u5bf9\u8c61\u4eceThread\u7c7b\u6d3e\u751f\u3002\u6ce8\u610fNewThread \u4e2dsuper()\u7684\u8c03\u7528\u3002\u8be5\u65b9\u6cd5\u8c03\u7528\u4e86\u4e0b\u5217\u5f62\u5f0f\u7684Thread\u6784\u9020\u51fd\u6570\uff1a<br \/>\n\u00a0\u00a0\u00a0 public Thread(String threadName)<br \/>\n\u8fd9\u91cc\uff0cthreadName\u6307\u5b9a\u7ebf\u7a0b\u540d\u79f0\u3002<br \/>\n\u9009\u62e9\u5408\u9002\u65b9\u6cd5<\/p>\n<p>\u5230\u8fd9\u91cc\uff0c\u4f60\u4e00\u5b9a\u4f1a\u5947\u602a\u4e3a\u4ec0\u4e48Java\u6709\u4e24\u79cd\u521b\u5efa\u5b50\u7ebf\u7a0b\u7684\u65b9\u6cd5\uff0c\u54ea\u4e00\u79cd\u66f4\u597d\u5462\u3002\u6240\u6709\u7684\u95ee\u9898\u90fd\u5f52\u4e8e\u4e00\u70b9\u3002Thread\u7c7b\u5b9a\u4e49\u4e86\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u88ab\u6d3e\u751f\u7c7b\u91cd\u8f7d\u3002\u5bf9\u4e8e\u6240\u6709\u7684\u65b9\u6cd5\uff0c\u60df\u4e00\u7684\u5fc5\u987b\u88ab\u91cd\u8f7d\u7684\u662frun()\u65b9\u6cd5\u3002\u8fd9\u5f53\u7136\u662f\u5b9e\u73b0Runnable\u63a5\u53e3\u6240\u9700\u7684\u540c\u6837\u7684\u65b9\u6cd5\u3002\u5f88\u591aJava\u7a0b\u5e8f\u5458\u8ba4\u4e3a\u7c7b\u4ec5\u5728\u5b83\u4eec\u88ab\u52a0\u5f3a\u6216\u4fee\u6539\u65f6\u5e94\u8be5\u88ab\u6269\u5c55\u3002\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u4e0d\u91cd\u8f7dThread\u7684\u5176\u4ed6\u65b9\u6cd5\u65f6\uff0c\u6700\u597d\u53ea\u5b9e\u73b0Runnable \u63a5\u53e3\u3002\u8fd9\u5f53\u7136\u7531\u4f60\u51b3\u5b9a\u3002\u7136\u800c\uff0c\u5728\u672c\u7ae0\u7684\u5176\u4ed6\u90e8\u5206\uff0c\u6211\u4eec\u5e94\u7528\u5b9e\u73b0runnable\u63a5\u53e3\u7684\u7c7b\u6765\u521b\u5efa\u7ebf\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u591a\u6570\u60c5\u51b5\uff0c\u901a\u8fc7\u5b9e\u4f8b\u5316\u4e00\u4e2aThread\u5bf9\u8c61\u6765\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\u3002 Java\u5b9a\u4e49\u4e86\u4e24\u79cd\u65b9\u5f0f\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[19],"tags":[],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/211"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211"}],"version-history":[{"count":4,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/211\/revisions"}],"predecessor-version":[{"id":313,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/211\/revisions\/313"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}