{"id":45034,"date":"2025-06-22T02:22:55","date_gmt":"2025-06-21T18:22:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/45034.html"},"modified":"2025-06-22T02:22:55","modified_gmt":"2025-06-21T18:22:55","slug":"java%e5%b7%a5%e5%8e%82%e6%a8%a1%e5%bc%8f%e5%8f%8a%e6%8a%bd%e8%b1%a1%e5%b7%a5%e5%8e%82%e6%a8%a1%e5%bc%8f%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/45034.html","title":{"rendered":"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3"},"content":{"rendered":"<h4>\u4e00\u3001\u5de5\u5382\u6a21\u5f0f&#xff08;Factory Pattern&#xff09;\u200c<\/h4>\n<p>\u200c\u6838\u5fc3\u601d\u60f3\u200c&#xff1a;\u5c01\u88c5\u5bf9\u8c61\u521b\u5efa\u903b\u8f91&#xff0c;\u89e3\u8026\u5ba2\u6237\u7aef\u4e0e\u5177\u4f53\u7c7b \u200c\u9002\u7528\u573a\u666f\u200c&#xff1a;\u9700\u8981\u52a8\u6001\u521b\u5efa\u591a\u79cd\u7c7b\u578b\u5bf9\u8c61&#xff0c;\u907f\u514d\u5728\u5ba2\u6237\u7aef\u4ee3\u7801\u4e2d\u786c\u7f16\u7801\u5177\u4f53\u7c7b\u3002<\/p>\n<h5>\u200c1. \u7b80\u5355\u5de5\u5382\u6a21\u5f0f&#xff08;Simple Factory&#xff09;\u200c<\/h5>\n<ul>\n<li>\u200c\u7ed3\u6784\u200c&#xff1a;\n<ul>\n<li>\u4ea7\u54c1\u63a5\u53e3&#xff08;Product&#xff09;<\/li>\n<li>\u5177\u4f53\u4ea7\u54c1\u7c7b&#xff08;ConcreteProductA\/ConcreteProductB&#xff09;<\/li>\n<li>\u5de5\u5382\u7c7b&#xff08;SimpleFactory&#xff09;\u6839\u636e\u53c2\u6570\u521b\u5efa\u5bf9\u8c61<\/li>\n<\/ul>\n<\/li>\n<li>\u200c\u4ee3\u7801\u793a\u4f8b\u200c&#xff1a; interface Product { void use(); }<br \/>\nclass ProductA implements Product { public void use() { System.out.println(&#034;\u4f7f\u7528\u4ea7\u54c1A&#034;); } }<br \/>\nclass ProductB implements Product { public void use() { System.out.println(&#034;\u4f7f\u7528\u4ea7\u54c1B&#034;); } }<\/p>\n<p>class SimpleFactory {<br \/>\n\u00a0 \u00a0 public static Product createProduct(String type) {<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 if (&#034;A&#034;.equals(type)) return new ProductA();<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 else if (&#034;B&#034;.equals(type)) return new ProductB();<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 throw new IllegalArgumentException(&#034;\u65e0\u6548\u7c7b\u578b&#034;);<br \/>\n\u00a0 \u00a0 }<br \/>\n}<br \/>\n\/\/ \u5ba2\u6237\u7aef\u8c03\u7528<br \/>\nProduct product &#061; SimpleFactory.createProduct(&#034;A&#034;);<br \/>\nproduct.use(); \u00a0\/\/ \u8f93\u51fa&#xff1a;\u4f7f\u7528\u4ea7\u54c1A<\/p>\n<\/li>\n<li>\u200c\u7f3a\u70b9\u200c&#xff1a;\u65b0\u589e\u4ea7\u54c1\u9700\u4fee\u6539\u5de5\u5382\u7c7b&#xff0c;\u8fdd\u53cd\u5f00\u95ed\u539f\u5219\u3002<\/li>\n<\/ul>\n<h5>\u200c2. \u5de5\u5382\u65b9\u6cd5\u6a21\u5f0f&#xff08;Factory Method&#xff09;\u200c<\/h5>\n<ul>\n<li>\u200c\u7ed3\u6784\u200c&#xff1a;\n<ul>\n<li>\u62bd\u8c61\u5de5\u5382\u63a5\u53e3&#xff08;Factory&#xff09;<\/li>\n<li>\u5177\u4f53\u5de5\u5382\u5b50\u7c7b&#xff08;FactoryA\/FactoryB&#xff09;\u8d1f\u8d23\u521b\u5efa\u7279\u5b9a\u4ea7\u54c1<\/li>\n<\/ul>\n<\/li>\n<li>\u200c\u4ee3\u7801\u793a\u4f8b\u200c&#xff1a; interface Factory { Product createProduct(); }<br \/>\nclass FactoryA implements Factory {<br \/>\n\u00a0 \u00a0 &#064;Override public Product createProduct() { return new ProductA(); }<br \/>\n}<br \/>\n\/\/ \u5ba2\u6237\u7aef\u8c03\u7528<br \/>\nFactory factory &#061; new FactoryA();<br \/>\nProduct product &#061; factory.createProduct();\n <\/li>\n<li>\u200c\u4f18\u52bf\u200c&#xff1a;\u65b0\u589e\u4ea7\u54c1\u65f6\u53ea\u9700\u6269\u5c55\u65b0\u5de5\u5382\u7c7b&#xff0c;\u7b26\u5408\u5f00\u95ed\u539f\u5219\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>\u200c\u4e8c\u3001\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f&#xff08;Abstract Factory Pattern&#xff09;\u200c<\/h4>\n<p>\u200c\u6838\u5fc3\u601d\u60f3\u200c&#xff1a;\u521b\u5efa\u200c\u76f8\u5173\u4ea7\u54c1\u65cf\u200c&#xff08;\u591a\u4e2a\u4ea7\u54c1\u7b49\u7ea7&#xff09;&#xff0c;\u5f3a\u8c03\u4ea7\u54c1\u95f4\u7684\u7ea6\u675f\u5173\u7cfb \u200c\u9002\u7528\u573a\u666f\u200c&#xff1a;\u9700\u8981\u6784\u5efa\u8de8\u5e73\u53f0\/\u8de8\u98ce\u683c\u7684\u6574\u5957\u4ea7\u54c1&#xff08;\u5982UI\u7ec4\u4ef6\u5e93\u3001\u6570\u636e\u5e93\u8fde\u63a5\u5957\u4ef6&#xff09;\u3002<\/p>\n<h5>\u200c1. \u6838\u5fc3\u7ed3\u6784\u200c\u00a0<\/h5>\n<table>\n<tr>\u200c\u89d2\u8272\u200c\u200c\u804c\u8d23\u200c<\/tr>\n<tbody>\n<tr>\n<td>\u62bd\u8c61\u5de5\u5382&#xff08;AbstractFactory&#xff09;<\/td>\n<td>\u58f0\u660e\u521b\u5efa\u4ea7\u54c1\u65cf\u7684\u65b9\u6cd5&#xff08;\u5982createButton()&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5177\u4f53\u5de5\u5382&#xff08;ConcreteFactory&#xff09;<\/td>\n<td>\u5b9e\u73b0\u5177\u4f53\u4ea7\u54c1\u65cf\u7684\u521b\u5efa&#xff08;\u5982WindowsFactory&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u62bd\u8c61\u4ea7\u54c1&#xff08;AbstractProduct&#xff09;<\/td>\n<td>\u5b9a\u4e49\u4ea7\u54c1\u63a5\u53e3&#xff08;\u5982Button\/TextField&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5177\u4f53\u4ea7\u54c1&#xff08;ConcreteProduct&#xff09;<\/td>\n<td>\u5b9e\u73b0\u5e73\u53f0\u76f8\u5173\u903b\u8f91&#xff08;\u5982WindowsButton&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>\u200c2. \u4ee3\u7801\u793a\u4f8b&#xff08;\u8de8\u5e73\u53f0UI\u7ec4\u4ef6&#xff09;\u200c\u00a0<\/h5>\n<p>\/\/ \u62bd\u8c61\u4ea7\u54c1<br \/>\ninterface Button { void paint(); }<br \/>\ninterface TextField { void render(); }<\/p>\n<p>\/\/ \u5177\u4f53\u4ea7\u54c1&#xff08;Windows\u98ce\u683c&#xff09;<br \/>\nclass WindowsButton implements Button {<br \/>\n\u00a0 \u00a0 &#064;Override public void paint() { System.out.println(&#034;Windows\u98ce\u683c\u6309\u94ae&#034;); }<br \/>\n}<br \/>\nclass WindowsTextField implements TextField {<br \/>\n\u00a0 \u00a0 &#064;Override public void render() { System.out.println(&#034;Windows\u98ce\u683c\u6587\u672c\u6846&#034;); }<br \/>\n}<\/p>\n<p>\/\/ \u62bd\u8c61\u5de5\u5382<br \/>\ninterface GUIFactory {<br \/>\n\u00a0 \u00a0 Button createButton();<br \/>\n\u00a0 \u00a0 TextField createTextField();<br \/>\n}<\/p>\n<p>\/\/ \u5177\u4f53\u5de5\u5382&#xff08;Windows\u4ea7\u54c1\u65cf&#xff09;<br \/>\nclass WindowsFactory implements GUIFactory {<br \/>\n\u00a0 \u00a0 &#064;Override public Button createButton() { return new WindowsButton(); }<br \/>\n\u00a0 \u00a0 &#064;Override public TextField createTextField() { return new WindowsTextField(); }<br \/>\n}<\/p>\n<p>\/\/ \u5ba2\u6237\u7aef\u8c03\u7528<br \/>\nGUIFactory factory &#061; new WindowsFactory();<br \/>\nButton button &#061; factory.createButton();<br \/>\nbutton.paint(); \u00a0\/\/ \u8f93\u51fa&#xff1a;Windows\u98ce\u683c\u6309\u94ae<\/p>\n<h5>\u200c3. \u4f18\u52bf\u4e0e\u5c40\u9650\u200c<\/h5>\n<ul>\n<li>\u200c\u4f18\u52bf\u200c&#xff1a;\n<ul>\n<li>\u4fdd\u8bc1\u4ea7\u54c1\u65cf\u517c\u5bb9\u6027&#xff08;\u5982\u6240\u6709Windows\u7ec4\u4ef6\u98ce\u683c\u4e00\u81f4&#xff09;<\/li>\n<li>\u5ba2\u6237\u7aef\u4ee3\u7801\u4e0e\u5177\u4f53\u5e73\u53f0\u89e3\u8026\u00a0<\/li>\n<\/ul>\n<\/li>\n<li>\u200c\u5c40\u9650\u200c&#xff1a;\u65b0\u589e\u4ea7\u54c1\u7b49\u7ea7&#xff08;\u5982\u65b0\u589eCheckbox&#xff09;\u9700\u4fee\u6539\u6240\u6709\u5de5\u5382\u63a5\u53e3\u00a0\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>\u200c\u4e09\u3001\u5de5\u5382\u6a21\u5f0f vs \u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u5bf9\u6bd4\u200c<\/h4>\n<table>\n<tr>\u200c\u7ef4\u5ea6\u200c\u5de5\u5382\u65b9\u6cd5\u6a21\u5f0f\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f<\/tr>\n<tbody>\n<tr>\n<td>\u200c\u6838\u5fc3\u76ee\u6807\u200c<\/td>\n<td>\u521b\u5efa\u5355\u4e00\u4ea7\u54c1<\/td>\n<td>\u521b\u5efa\u4ea7\u54c1\u65cf&#xff08;\u591a\u4e2a\u76f8\u5173\u4ea7\u54c1&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200c\u4ea7\u54c1\u590d\u6742\u5ea6\u200c<\/td>\n<td>\u5355\u4ea7\u54c1\u7b49\u7ea7<\/td>\n<td>\u591a\u4ea7\u54c1\u7b49\u7ea7&#xff08;\u5982\u6309\u94ae&#043;\u6587\u672c\u6846&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200c\u6269\u5c55\u65b9\u5411\u200c<\/td>\n<td>\u6269\u5c55\u65b0\u4ea7\u54c1&#xff08;\u7eb5\u5411&#xff09;<\/td>\n<td>\u6269\u5c55\u65b0\u4ea7\u54c1\u65cf&#xff08;\u6a2a\u5411&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u200c\u5178\u578b\u5e94\u7528\u200c<\/td>\n<td>Spring\u7684BeanFactory<\/td>\n<td>JDBC\u7684DriverManager<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>\u200c\u56db\u3001\u6f14\u8fdb\u5173\u7cfb\u4e0e\u9009\u62e9\u5efa\u8bae\u200c<\/h4>\n<li>\u200c\u6f14\u8fdb\u8def\u7ebf\u200c&#xff1a; \u7b80\u5355\u5de5\u5382 \u2192 \u5de5\u5382\u65b9\u6cd5 \u2192 \u62bd\u8c61\u5de5\u5382&#xff08;\u590d\u6742\u5ea6\u9012\u589e&#xff09;<\/li>\n<li>\u200c\u9009\u578b\u5efa\u8bae\u200c&#xff1a;\n<ul>\n<li>\u5355\u4e00\u4ea7\u54c1\u53d8\u5316 \u2192 \u200c\u5de5\u5382\u65b9\u6cd5\u200c&#xff08;\u5982\u65e5\u5fd7\u8bb0\u5f55\u5668&#xff09;<\/li>\n<li>\u591a\u4ea7\u54c1\u7ec4\u5408\u7ea6\u675f \u2192 \u200c\u62bd\u8c61\u5de5\u5382\u200c&#xff08;\u5982\u8de8\u5e73\u53f0UI\u3001\u6570\u636e\u5e93\u9002\u914d\u5668&#xff09;<\/li>\n<li>\u907f\u514d\u6ee5\u7528&#xff1a;\u7b80\u5355\u573a\u666f\u76f4\u63a5new\u66f4\u9ad8\u6548\u00a0\u3002<\/li>\n<\/ul>\n<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb933\u6b21\uff0c\u70b9\u8d5e49\u6b21\uff0c\u6536\u85cf9\u6b21\u3002class ProductA implements Product { public void use() { System.out.println(&quot;\u4f7f\u7528\u4ea7\u54c1A&quot;);class ProductB implements Product { public void use() { System.out.println(&quot;\u4f7f\u7528\u4ea7\u54c1B&quot;);@Override public void paint() { System.out.println(&quot;Windows\u98ce\u683c\u6309\u94ae&quot;);\/\/ \u5177\u4f53\u4ea7\u54c1\uff08Windows\u98ce\u683c\uff09_java\u5de5\u5382\u6a21\u5f0f\u9009\u62e9<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,190,4251],"topic":[],"class_list":["post-45034","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-190","tag-4251"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/45034.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb933\u6b21\uff0c\u70b9\u8d5e49\u6b21\uff0c\u6536\u85cf9\u6b21\u3002class ProductA implements Product { public void use() { System.out.println(&quot;\u4f7f\u7528\u4ea7\u54c1A&quot;);class ProductB implements Product { public void use() { System.out.println(&quot;\u4f7f\u7528\u4ea7\u54c1B&quot;);@Override public void paint() { System.out.println(&quot;Windows\u98ce\u683c\u6309\u94ae&quot;);\/\/ \u5177\u4f53\u4ea7\u54c1\uff08Windows\u98ce\u683c\uff09_java\u5de5\u5382\u6a21\u5f0f\u9009\u62e9\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/45034.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-21T18:22:55+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/45034.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/45034.html\",\"name\":\"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-21T18:22:55+00:00\",\"dateModified\":\"2025-06-21T18:22:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/45034.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/45034.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/45034.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/45034.html","og_locale":"zh_CN","og_type":"article","og_title":"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb933\u6b21\uff0c\u70b9\u8d5e49\u6b21\uff0c\u6536\u85cf9\u6b21\u3002class ProductA implements Product { public void use() { System.out.println(&quot;\u4f7f\u7528\u4ea7\u54c1A&quot;);class ProductB implements Product { public void use() { System.out.println(&quot;\u4f7f\u7528\u4ea7\u54c1B&quot;);@Override public void paint() { System.out.println(&quot;Windows\u98ce\u683c\u6309\u94ae&quot;);\/\/ \u5177\u4f53\u4ea7\u54c1\uff08Windows\u98ce\u683c\uff09_java\u5de5\u5382\u6a21\u5f0f\u9009\u62e9","og_url":"https:\/\/www.wsisp.com\/helps\/45034.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-21T18:22:55+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/45034.html","url":"https:\/\/www.wsisp.com\/helps\/45034.html","name":"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-21T18:22:55+00:00","dateModified":"2025-06-21T18:22:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/45034.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/45034.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/45034.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Java\u5de5\u5382\u6a21\u5f0f\u53ca\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/45034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=45034"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/45034\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=45034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=45034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=45034"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=45034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}