{"id":16624,"date":"2024-11-18T13:27:19","date_gmt":"2024-11-18T05:27:19","guid":{"rendered":"https:\/\/92it.top\/?p=16624"},"modified":"2024-11-18T13:27:19","modified_gmt":"2024-11-18T05:27:19","slug":"java-%e4%b8%ad%e4%bb%80%e4%b9%88%e6%83%85%e5%86%b5%e4%bc%9a%e5%af%bc%e8%87%b4%e6%ad%bb%e9%94%81%ef%bc%9f%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=16624","title":{"rendered":"Java \u4e2d\u4ec0\u4e48\u60c5\u51b5\u4f1a\u5bfc\u81f4\u6b7b\u9501\uff1f\u5982\u4f55\u907f\u514d\uff1f"},"content":{"rendered":"\n<p>\u8f6c\u8f7d\uff1aJ<a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzIwNDAyOTI2Nw==&amp;mid=2247500514&amp;idx=1&amp;sn=b8dc766d8d0acbe982bd1c98fb81f486&amp;chksm=96c4eedea1b367c89a40e71a20aa71f1736324de626ff118747827b256421aa667447892639a&amp;cur_album_id=2818595943724974083&amp;scene=190#rd\">ava \u4e2d\u4ec0\u4e48\u60c5\u51b5\u4f1a\u5bfc\u81f4\u6b7b\u9501\uff1f\u5982\u4f55\u907f\u514d\uff1f<\/a><\/p>\n\n\n\n<p>\u5728 Java\u7f16\u7a0b\u4e2d\uff0c\u6b7b\u9501\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u591a\u7ebf\u7a0b\u95ee\u9898\uff0c\u5b83\u53d1\u751f\u5728\u4e24\u4e2a\u6216\u591a\u4e2a\u7ebf\u7a0b\u5f7c\u6b64\u7b49\u5f85\u5bf9\u65b9\u6301\u6709\u7684\u8d44\u6e90\u65f6\uff0c\u5bfc\u81f4\u8fd9\u4e9b\u7ebf\u7a0b\u90fd\u65e0\u6cd5\u7ee7\u7eed\u6267\u884c\u3002\u6b7b\u9501\u95ee\u9898\u7684\u89e3\u51b3\u548c\u907f\u514d\u662f\u591a\u7ebf\u7a0b\u7f16\u7a0b\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u8bfe\u9898\u3002\u8fd9\u7bc7\u6587\u7ae0\uff0c\u6211\u4eec\u4e00\u8d77\u6765\u63a2\u8ba8 Java\u4e2d\u6b7b\u9501\u7684\u60c5\u51b5\u53ca\u907f\u514d\u65b9\u6cd5\u7684\u8be6\u7ec6\u3002<\/p>\n\n\n\n<p><strong>1. \u6b7b\u9501\u7684\u4ea7\u751f\u6761\u4ef6<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6b7b\u9501\u7684\u53d1\u751f\u901a\u5e38\u9700\u8981\u6ee1\u8db3\u4ee5\u4e0b\u56db\u4e2a\u6761\u4ef6\uff1a<\/p>\n\n\n\n<ol>\n<li><strong>\u4e92\u65a5\u6761\u4ef6<\/strong>\uff1a\u8d44\u6e90\u4e0d\u80fd\u88ab\u591a\u4e2a\u7ebf\u7a0b\u540c\u65f6\u4f7f\u7528\u3002\u5373\u67d0\u4e2a\u8d44\u6e90\u5728\u67d0\u4e2a\u65f6\u523b\u53ea\u80fd\u88ab\u4e00\u4e2a\u7ebf\u7a0b\u5360\u6709\u3002<\/li>\n\n\n\n<li><strong>\u5360\u6709\u4e14\u7b49\u5f85\u6761\u4ef6<\/strong>\uff1a\u4e00\u4e2a\u7ebf\u7a0b\u5df2\u7ecf\u6301\u6709\u81f3\u5c11\u4e00\u4e2a\u8d44\u6e90\uff0c\u5e76\u4e14\u5728\u7b49\u5f85\u83b7\u53d6\u989d\u5916\u7684\u8d44\u6e90\uff0c\u800c\u8fd9\u4e9b\u8d44\u6e90\u88ab\u5176\u4ed6\u7ebf\u7a0b\u6301\u6709\u3002<\/li>\n\n\n\n<li><strong>\u4e0d\u53ef\u5265\u593a\u6761\u4ef6<\/strong>\uff1a\u8d44\u6e90\u4e0d\u80fd\u88ab\u5f3a\u5236\u5265\u593a\uff0c\u7ebf\u7a0b\u53ea\u80fd\u5728\u5b8c\u6210\u4efb\u52a1\u540e\u81ea\u613f\u91ca\u653e\u6240\u6301\u6709\u7684\u8d44\u6e90\u3002<\/li>\n\n\n\n<li><strong>\u73af\u8def\u7b49\u5f85\u6761\u4ef6<\/strong>\uff1a\u5b58\u5728\u4e00\u4e2a\u7ebf\u7a0b\u7b49\u5f85\u94fe\uff0c\u94fe\u4e2d\u7684\u6bcf\u4e2a\u7ebf\u7a0b\u90fd\u5728\u7b49\u5f85\u94fe\u4e2d\u7684\u4e0b\u4e00\u4e2a\u7ebf\u7a0b\u6240\u6301\u6709\u7684\u8d44\u6e90\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u5f53\u4e0a\u9762\u8fd9\u56db\u4e2a\u6761\u4ef6\u540c\u65f6\u6ee1\u8db3\u65f6\uff0c\u5c31\u4f1a\u53d1\u751f\u6b7b\u9501\u3002<\/p>\n\n\n\n<p><strong>2. \u6b7b\u9501\u7684\u6848\u4f8b<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5982\u4e0b\u56fe\uff1a\u7ebf\u7a0b1\u6301\u6709 ResourceA\u7684\u9501\u5e76\u7b49\u5f85 ResourceB\u7684\u9501\uff0c\u7ebf\u7a0b2\u6301\u6709 ResourceB\u7684\u9501\u5e76\u7b49\u5f85ResourceA\u7684\u9501\uff0c\u8fd9\u6837Thread1\u548cThread2\u5c31\u5f62\u6210\u4e86\u6b7b\u9501\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-1024x514.png\" alt=\"\" class=\"wp-image-16625\" style=\"width:492px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-1024x514.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-300x151.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-768x385.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-830x416.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-230x115.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-350x176.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128-480x241.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-128.png 1160w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u4e0b\u9762\uff0c\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u7b80\u5355\u7684Java\u793a\u4f8b\u6765\u63cf\u8ff0\u4e0a\u9762\u6b7b\u9501\u7684\u60c5\u51b5\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class DeadlockExample {\n\n    private static final Object lock1 = new Object();\n    private static final Object lock2 = new Object();\n\n    public static void main(String[] args) {\n        Thread thread1 = new Thread(() -> {\n            synchronized (lock1) {\n                System.out.println(\"Thread 1: Holding lock 1...\");\n\n                try { Thread.sleep(10); } catch (InterruptedException e) {}\n\n                System.out.println(\"Thread 1: Waiting for lock 2...\");\n                synchronized (lock2) {\n                    System.out.println(\"Thread 1: Holding lock 1 &amp; 2...\");\n                }\n            }\n        });\n\n        Thread thread2 = new Thread(() -> {\n            synchronized (lock2) {\n                System.out.println(\"Thread 2: Holding lock 2...\");\n\n                try { Thread.sleep(10); } catch (InterruptedException e) {}\n\n                System.out.println(\"Thread 2: Waiting for lock 1...\");\n                synchronized (lock1) {\n                    System.out.println(\"Thread 2: Holding lock 1 &amp; 2...\");\n                }\n            }\n        });\n\n        thread1.start();\n        thread2.start();\n    }\n}<\/pre>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>thread1<\/code>\u9996\u5148\u83b7\u5f97<code>lock1<\/code>\uff0c\u7136\u540e\u7b49\u5f85<code>lock2<\/code>\uff0c\u800c<code>thread2<\/code>\u9996\u5148\u83b7\u5f97<code>lock2<\/code>\uff0c\u7136\u540e\u7b49\u5f85<code>lock1<\/code>\u3002\u8fd9\u5c31\u5bfc\u81f4\u4e86\u6b7b\u9501\uff0c\u56e0\u4e3a\u4e24\u4e2a\u7ebf\u7a0b\u90fd\u5728\u7b49\u5f85\u5bf9\u65b9\u6301\u6709\u7684\u9501\u5e76\u4e14\u65e0\u6cd5\u7ee7\u7eed\u6267\u884c\u3002<\/p>\n\n\n\n<p><strong>3. \u907f\u514d\u6b7b\u9501\u7684\u65b9\u6cd5<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728 Java\u4e2d\uff0c\u907f\u514d\u7684\u6b7b\u9501\u7684\u65b9\u5f0f\u8fd8\u662f\u6bd4\u8f83\u4e30\u5bcc\u7684\uff0c\u8fd9\u91cc\u6211\u5217\u4e3e\u4e86\u4e00\u4e9b\u5e38\u89c1\u7684\u907f\u514d\u6b7b\u9501\u7684\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<p><strong>3.1 \u8d44\u6e90\u6392\u5e8f\u6cd5<\/strong><\/p>\n\n\n\n<p>\u8d44\u6e90\u6392\u5e8f\u6cd5\uff08Resource Ordering\uff09\u662f\u901a\u8fc7\u5bf9\u8d44\u6e90\u8fdb\u884c\u5168\u5c40\u6392\u5e8f\uff0c\u786e\u4fdd\u6240\u6709\u7ebf\u7a0b\u90fd\u6309\u7167\u76f8\u540c\u7684\u987a\u5e8f\u83b7\u53d6\u9501\uff0c\u4ece\u800c\u907f\u514d\u5faa\u73af\u7b49\u5f85\u3002\u4f8b\u5982\uff0c\u7ebf\u7a0b\u5728\u83b7\u53d6\u591a\u4e2a\u9501\u65f6\uff0c\u603b\u662f\u5148\u83b7\u53d6\u7f16\u53f7\u5c0f\u7684\u9501\uff0c\u518d\u83b7\u53d6\u7f16\u53f7\u5927\u7684\u9501\u3002<\/p>\n\n\n\n<p><strong>3.2 \u5c1d\u8bd5\u9501<\/strong><\/p>\n\n\n\n<p>\u5c1d\u8bd5\u9501\uff08Try Lock\uff09\u662f\u4f7f\u7528<code>tryLock()<\/code>\u65b9\u6cd5\u6765\u4ee3\u66ff<code>lock()<\/code>\u65b9\u6cd5\u3002\u5728\u5c1d\u8bd5\u83b7\u53d6\u9501\u65f6\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u8d85\u65f6\u65f6\u95f4\uff0c\u5982\u679c\u5728\u89c4\u5b9a\u65f6\u95f4\u5185\u65e0\u6cd5\u83b7\u5f97\u9501\uff0c\u5219\u653e\u5f03\u83b7\u53d6\u9501\uff0c\u4ece\u800c\u907f\u514d\u6b7b\u9501\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Lock lock1 = new ReentrantLock();\nLock lock2 = new ReentrantLock();\n\ntry {\n    if (lock1.tryLock(50, TimeUnit.MILLISECONDS)) {\n        try {\n            if (lock2.tryLock(50, TimeUnit.MILLISECONDS)) {\n                try {\n                    \/\/ critical section\n                } finally {\n                    lock2.unlock();\n                }\n            }\n        } finally {\n            lock1.unlock();\n        }\n    }\n} catch (InterruptedException e) {\n    e.printStackTrace();\n}<\/pre>\n\n\n\n<p><strong>3.3 \u8d85\u65f6\u653e\u5f03\u6cd5<\/strong><\/p>\n\n\n\n<p>\u8d85\u65f6\u653e\u5f03\u6cd5\uff08Timeout and Retry\uff09\u662f\u6307\u4e3a\u7ebf\u7a0b\u7b49\u5f85\u8d44\u6e90\u7684\u65f6\u95f4\u8bbe\u7f6e\u4e0a\u9650\uff0c\u5982\u679c\u8d85\u8fc7\u8fd9\u4e2a\u65f6\u95f4\u8fd8\u6ca1\u6709\u83b7\u5f97\u8d44\u6e90\uff0c\u5219\u4e3b\u52a8\u653e\u5f03\uff0c\u5e76\u7a0d\u540e\u91cd\u8bd5\u3002<\/p>\n\n\n\n<p>\u5982\u4e0b\u793a\u4f8b\u5c55\u793a\u4e86\u8d85\u65f6\u653e\u5f03\u6cd5\u7684\u5b9e\u73b0\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import java.util.concurrent.locks.Lock;\nimport java.util.concurrent.locks.ReentrantLock;\nimport java.util.concurrent.TimeUnit;\n\npublic class TimeoutAvoidanceExample {\n\n    private static final Lock lock1 = new ReentrantLock();\n    private static final Lock lock2 = new ReentrantLock();\n\n    public static void main(String[] args) {\n        Thread thread1 = new Thread(new Task(lock1, lock2), \"Thread-1\");\n        Thread thread2 = new Thread(new Task(lock2, lock1), \"Thread-2\");\n\n        thread1.start();\n        thread2.start();\n    }\n\n    static class Task implements Runnable {\n        private final Lock firstLock;\n        private final Lock secondLock;\n\n        public Task(Lock firstLock, Lock secondLock) {\n            this.firstLock = firstLock;\n            this.secondLock = secondLock;\n        }\n\n        @Override\n        public void run() {\n            while (true) {\n                try {\n                    \/\/ \u5c1d\u8bd5\u83b7\u53d6\u7b2c\u4e00\u4e2a\u9501\n                    if (firstLock.tryLock(50, TimeUnit.MILLISECONDS)) {\n                        try {\n                            \/\/ \u5c1d\u8bd5\u83b7\u53d6\u7b2c\u4e8c\u4e2a\u9501\n                            if (secondLock.tryLock(50, TimeUnit.MILLISECONDS)) {\n                                try {\n                                    \/\/ \u6210\u529f\u83b7\u53d6\u4e24\u4e2a\u9501\u540e\u6267\u884c\u5173\u952e\u64cd\u4f5c\n                                    System.out.println(Thread.currentThread().getName() + \": Acquired both locks, performing task.\");\n                                    break; \/\/ \u9000\u51fa\u5faa\u73af\uff0c\u4efb\u52a1\u5b8c\u6210\n                                } finally {\n                                    secondLock.unlock();\n                                }\n                            }\n                        } finally {\n                            firstLock.unlock();\n                        }\n                    }\n                    \/\/ \u5982\u679c\u672a\u80fd\u83b7\u53d6\u9501\uff0c\u5219\u7a0d\u540e\u91cd\u8bd5\n                    System.out.println(Thread.currentThread().getName() + \": Could not acquire both locks, retrying...\");\n                    Thread.sleep(10); \/\/ \u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u91cd\u8bd5\n                } catch (InterruptedException e) {\n                    e.printStackTrace();\n                }\n            }\n        }\n    }\n}<\/pre>\n\n\n\n<p>\u4ee3\u7801\u89e3\u8bfb<\/p>\n\n\n\n<ul>\n<li>\u9501\u7684\u5b9a\u4e49\uff1a\u4f7f\u7528ReentrantLock\u6765\u521b\u5efa\u4e24\u4e2a\u9501lock1\u548clock2\u3002<\/li>\n\n\n\n<li>\u7ebf\u7a0b\u4efb\u52a1\uff1aTask\u7c7b\u5b9e\u73b0\u4e86Runnable\u63a5\u53e3\uff0c\u6bcf\u4e2a\u4efb\u52a1\u5c1d\u8bd5\u4ee5\u8d85\u65f6\u65b9\u5f0f\u83b7\u53d6\u4e24\u4e2a\u9501\u3002<\/li>\n\n\n\n<li>tryLock\u65b9\u6cd5\uff1atryLock(long time, TimeUnit unit)\u65b9\u6cd5\u5141\u8bb8\u7ebf\u7a0b\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u6765\u83b7\u53d6\u9501\uff0c\u5982\u679c\u5728\u6307\u5b9a\u65f6\u95f4\u5185\u83b7\u53d6\u4e0d\u5230\u9501\uff0c\u5219\u8fd4\u56defalse\u3002<\/li>\n\n\n\n<li>\u5faa\u73af\u91cd\u8bd5\uff1a\u5982\u679c\u7ebf\u7a0b\u672a\u80fd\u5728\u8d85\u65f6\u5185\u83b7\u53d6\u5230\u4e24\u4e2a\u9501\uff0c\u5b83\u4f1a\u91ca\u653e\u5df2\u7ecf\u83b7\u5f97\u7684\u9501\uff0c\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u518d\u6b21\u5c1d\u8bd5\u3002\u8fd9\u79cd\u65b9\u5f0f\u907f\u514d\u4e86\u6b7b\u9501\uff0c\u56e0\u4e3a\u7ebf\u7a0b\u4e0d\u4f1a\u65e0\u9650\u671f\u5730\u7b49\u5f85\u9501\u3002<\/li>\n\n\n\n<li>\u7ebf\u7a0b\u542f\u52a8\uff1a\u521b\u5efa\u5e76\u542f\u52a8\u4e24\u4e2a\u7ebf\u7a0b\uff0c\u6bcf\u4e2a\u7ebf\u7a0b\u5c1d\u8bd5\u83b7\u53d6\u4e0d\u540c\u987a\u5e8f\u7684\u9501\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>3.4 \u6b7b\u9501\u68c0\u6d4b<\/strong><\/p>\n\n\n\n<p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b7b\u9501\u68c0\u6d4b\u7b97\u6cd5\u6765\u53d1\u73b0\u6b7b\u9501\u5e76\u91c7\u53d6\u63aa\u65bd\u3002Java\u4e2d\u7684<code>java.lang.management<\/code>\u5305\u63d0\u4f9b\u4e86\u68c0\u6d4b\u6b7b\u9501\u7684\u5de5\u5177\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();\nlong[] deadlockedThreads = threadMXBean.findDeadlockedThreads();\n\nif (deadlockedThreads != null) {\n    System.out.println(\"Deadlock detected!\");\n    \/\/ Handle the deadlock situation\n}<\/pre>\n\n\n\n<p><strong>3.5 \u51cf\u5c11\u9501\u7684\u6301\u6709\u65f6\u95f4<\/strong><\/p>\n\n\n\n<p>\u5c3d\u91cf\u7f29\u77ed\u9501\u7684\u6301\u6709\u65f6\u95f4\uff0c\u786e\u4fdd\u5728\u9501\u5185\u6267\u884c\u7684\u64cd\u4f5c\u5c3d\u53ef\u80fd\u5c11\uff0c\u4ece\u800c\u51cf\u5c11\u53d1\u751f\u6b7b\u9501\u7684\u673a\u4f1a\u3002<\/p>\n\n\n\n<p><strong>3.6 \u4f7f\u7528\u66f4\u9ad8\u5c42\u6b21\u7684\u5e76\u53d1\u5de5\u5177<\/strong><\/p>\n\n\n\n<p>Java\u63d0\u4f9b\u4e86\u8bb8\u591a\u9ad8\u7ea7\u5e76\u53d1\u5de5\u5177\u7c7b\uff0c\u5982<code>java.util.concurrent<\/code>\u5305\u4e0b\u7684<code>ConcurrentHashMap<\/code>\u3001<code>Semaphore<\/code>\u3001<code>CountDownLatch<\/code>\u7b49\uff0c\u8fd9\u4e9b\u5de5\u5177\u7c7b\u5728\u8bbe\u8ba1\u65f6\u5c31\u8003\u8651\u4e86\u5e76\u53d1\u8bbf\u95ee\u7684\u5b89\u5168\u6027\u5e76\u51cf\u5c11\u4e86\u6b7b\u9501\u7684\u53ef\u80fd\u6027\u3002<\/p>\n\n\n\n<p><strong>3.7 \u907f\u514d\u5d4c\u5957\u9501<\/strong><\/p>\n\n\n\n<p>\u907f\u514d\u5d4c\u5957\u9501\uff08Avoid Nested Locks\uff0c\u5c3d\u91cf\u907f\u514d\u4e00\u4e2a\u7ebf\u7a0b\u5728\u6301\u6709\u4e00\u4e2a\u9501\u7684\u540c\u65f6\u53bb\u83b7\u53d6\u53e6\u4e00\u4e2a\u9501\uff0c\u56e0\u4e3a\u8fd9\u4f1a\u589e\u52a0\u53d1\u751f\u6b7b\u9501\u7684\u98ce\u9669\u3002<\/p>\n\n\n\n<p><strong>4. \u603b\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6b7b\u9501\u662f\u591a\u7ebf\u7a0b\u7f16\u7a0b\u4e2d\u4e00\u4e2a\u590d\u6742\u800c\u53c8\u8ba9\u4eba\u5934\u75bc\u7684\u95ee\u9898\uff0c\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u6b7b\u9501\u95ee\u9898\u6709\u65f6\u5019\u53d1\u751f\u8fd8\u5f88\u96be\u627e\u5230\u539f\u56e0\uff0c\u56e0\u6b64\uff0c\u5728\u65e5\u5e38\u5f00\u53d1\u4e2d\u9075\u5faa\u826f\u597d\u7684\u7f16\u7a0b\u5b9e\u8df5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u907f\u514d\u548c\u5904\u7406\u6b7b\u9501\u3002<\/p>\n\n\n\n<p>\u4f5c\u4e3a\u6280\u672f\u4eba\u5458\uff0c\u9700\u8981\u638c\u63e1\u6b7b\u9501\u4ea7\u751f\u6839\u672c\u539f\u56e0\uff0c\u8fd9\u6837\uff0c\u5373\u4fbf\u6b7b\u9501\u53d1\u751f\u4e86\u4e5f\u80fd\u5feb\u901f\u7684\u5b9a\u4f4d\u548c\u89e3\u51b3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\uff1aJava \u4e2d\u4ec0\u4e48\u60c5\u51b5\u4f1a\u5bfc\u81f4\u6b7b\u9501\uff1f\u5982\u4f55\u907f\u514d\uff1f \u5728 Java\u7f16\u7a0b\u4e2d\uff0c\u6b7b\u9501\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u591a\u7ebf\u7a0b\u95ee\u9898\uff0c\u5b83\u53d1\u751f\u5728\u4e24\u4e2a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16624"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16624"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16624\/revisions"}],"predecessor-version":[{"id":16626,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16624\/revisions\/16626"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}