{"id":898,"date":"2022-11-24T21:15:50","date_gmt":"2022-11-25T05:15:50","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java-ch\/?p=898"},"modified":"2022-11-24T21:23:25","modified_gmt":"2022-11-25T05:23:25","slug":"java-on-visual-studio-code-2022-11","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java-ch\/java-on-visual-studio-code-2022-11\/","title":{"rendered":"Visual Studio Code\u4e0a\u5df2\u6709\u4e24\u767e\u4e07Java\u5f00\u53d1\u8005\uff012022\u5e7411\u6708\u7684\u66f4\u65b0"},"content":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u4eec\u5f88\u9ad8\u5174\u4e0e\u5927\u5bb6\u5206\u4eab\u4e00\u4e2a\u597d\u6d88\u606f\uff0c\u73b0\u5728 Visual Studio Code \u4e0a\u5df2\u6709\u8d85\u8fc7 200 \u4e07 Java \u5f00\u53d1\u8005\uff0c\u8fd9\u8981\u6765\u81ea\u4e8e\u957f\u671f\u793e\u533a\u4ee5\u53ca\u7528\u6237\u7684\u652f\u6301\uff0c\u6240\u4ee5\u8c22\u8c22\u4f60\u4eec\uff01<\/p>\n<p>\u5bf9\u4e8e 11 \u6708\u7684\u66f4\u65b0\uff0c\u6211\u4eec\u4e3a\u60a8\u5e26\u6765\u4e86\u5168\u65b0\u7684\u4ee3\u7801\u7f16\u8f91\u529f\u80fd\uff0c\u4f8b\u5982\u540e\u7f00\u8865\u5168\u3001\u4f18\u5316\u7684\u7ec4\u7ec7\u5bfc\u5165\u3002\u6b64\u5916\uff0c\u8c03\u8bd5\u5668\u5f97\u5230\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u66f4\u65b0\uff0c\u56e0\u4e3a\u6211\u4eec\u652f\u6301\u4e00\u4e2a\u540d\u4e3a\u201cStep Into Target\uff08\u76f4\u63a5\u8fdb\u5165\u51fd\u6570\uff09\u201d\u7684\u65b0\u529f\u80fd\u3002\u6700\u540e\uff0c\u6211\u4eec\u5bf9 Spring \u7ec4\u4ef6\u8fdb\u884c\u4e86\u4e00\u4e9b\u89c6\u89c9\u589e\u5f3a\uff0c\u8ba9\u6211\u4eec\u5f00\u59cb\u5427\u3002<\/p>\n<h4><strong>\u540e\u7f00\u5b8c\u6210<\/strong><\/h4>\n<p>\u540e\u7f00\u8865\u5168\u8ba9\u60a8\u53ef\u4ee5\u5728\u521a\u521a\u952e\u5165\u7684\u8868\u8fbe\u5f0f\u540e\u6dfb\u52a0\u4ee3\u7801\u7247\u6bb5\uff0c\u4ece\u800c\u63d0\u9ad8\u60a8\u7684\u5de5\u4f5c\u6548\u7387\u3002\u8fd9\u662fJetBrain\u4ea7\u54c1\u4e2d\u7684\u4e00\u9879\u6d41\u884c\u529f\u80fd\uff0c\u793e\u533a\u4e5f\u901a\u8fc7<a href=\"https:\/\/github.com\/redhat-developer\/vscode-java\/issues\/1455\">GitHub<\/a>\u8981\u6c42\u6211\u4eec\u7684\u63d2\u4ef6\u63d0\u4f9b\u8fd9\u4e00\u9879\u529f\u80fd\u3002\u901a\u8fc7\u5bf9\u4e0a\u6e38\u7684\u4e00\u4e9b\u8c03\u67e5\u548c\u66f4\u6539\uff0c\u6211\u4eec\u5df2\u7ecf\u6211\u4eec\u7684\u6700\u65b0\u7248\u672c\u4e2d\u652f\u6301\u540e\u7f00\u8865\u5168\u3002<\/p>\n<p>\u6211\u4eec\u76ee\u524d\u652f\u6301\u7684\u540e\u7f00\u5feb\u6377\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<table style=\"width: 83.3574%; height: 364px;\" role=\"table\">\n<thead>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\"><strong>\u5feb\u6377\u952e<\/strong><\/td>\n<td style=\"width: 244px; height: 28px;\"><strong>\u6a21\u677f\u5185\u5bb9<\/strong><\/td>\n<td style=\"width: 544px; height: 28px;\"><strong>\u63cf\u8ff0<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">cast<\/td>\n<td style=\"width: 244px; height: 28px;\">((SomeType) expr)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u5c06\u8868\u8fbe\u5f0f\u8f6c\u6362\u4e3a\u65b0\u7c7b\u578b<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">else<\/td>\n<td style=\"width: 244px; height: 28px;\">if (!expr)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a\u5426\u5b9a\u7684 if \u8bed\u53e5<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">for<\/td>\n<td style=\"width: 244px; height: 28px;\">for (T item : expr)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a for \u8bed\u53e5<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">fori<\/td>\n<td style=\"width: 244px; height: 28px;\">for (int i = 0; i &lt; expr.length; i++)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a\u904d\u5386\u6570\u7ec4\u7684 for \u8bed\u53e5<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">forr<\/td>\n<td style=\"width: 244px; height: 28px;\">for (int i = expr.length-1; i &gt;= 0; i&#8211;)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a for \u8bed\u53e5\uff0c\u4ee5\u76f8\u53cd\u7684\u987a\u5e8f\u904d\u5386\u6570\u7ec4<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">if<\/td>\n<td style=\"width: 244px; height: 28px;\">if (expr)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2aif \u8bed\u53e5<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">nnull<\/td>\n<td style=\"width: 244px; height: 28px;\">if (expr != null)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a if \u8bed\u53e5\u5e76\u68c0\u67e5\u8868\u8fbe\u5f0f\u662f\u5426\u4e0d\u89e3\u6790\u4e3a null<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">null<\/td>\n<td style=\"width: 244px; height: 28px;\">if (expr == null)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a if \u8bed\u53e5\uff0c\u68c0\u67e5\u8868\u8fbe\u5f0f\u662f\u5426\u89e3\u6790\u4e3a null<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">sysout<\/td>\n<td style=\"width: 244px; height: 28px;\">System.out.println(expr)<\/td>\n<td style=\"width: 544px; height: 28px;\">\u5c06\u53d7\u5f71\u54cd\u7684\u5b57\u7b26\u4e32\u53d1\u9001\u5230System.out.println (..) \u8c03\u7528<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">throw<\/td>\n<td style=\"width: 244px; height: 28px;\">throw expr<\/td>\n<td style=\"width: 544px; height: 28px;\">\u629b\u51fa\u7ed9\u5b9a\u7684\u5f02\u5e38<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">var<\/td>\n<td style=\"width: 244px; height: 28px;\">T name = expr<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a\u65b0\u53d8\u91cf<\/td>\n<\/tr>\n<tr style=\"height: 28px;\">\n<td style=\"width: 51px; height: 28px;\">while<\/td>\n<td style=\"width: 244px; height: 28px;\">while (expr) {}<\/td>\n<td style=\"width: 544px; height: 28px;\">\u521b\u5efa\u4e00\u4e2a while \u5faa\u73af<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u662f\u6b64\u529f\u80fd\u7684\u6f14\u793a\uff1a<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/postfix.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-902\" src=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/postfix.gif\" alt=\"Postfix completion\" width=\"1882\" height=\"1176\" \/><\/a><\/p>\n<p>\u6211\u4eec\u8ba1\u5212\u7ee7\u7eed\u6dfb\u52a0\u66f4\u591a\u540e\u7f00\u5feb\u6377\u65b9\u5f0f\uff0c\u656c\u8bf7\u671f\u5f85\u3002<\/p>\n<h4><strong>\u7ec4\u7ec7\/\u6e05\u7406\u5bfc\u5165(Organize Import)\u7684\u4f18\u5316<\/strong><\/h4>\n<p>\u7ec4\u7ec7\u5bfc\u5165(Organize Import)\u662f Java \u5f00\u53d1\u4eba\u5458\u5728\u4ee3\u7801\u7f16\u8f91\u8fc7\u7a0b\u4e2d\u6700\u5e38\u89c1\u7684\u64cd\u4f5c\u4e4b\u4e00\u3002\u6211\u4eec\u9488\u5bf9\u8fd9\u4e2a\u573a\u666f\u505a\u4e86\u4e00\u4e9b\u4f18\u5316\u3002<\/p>\n<ul>\n<li>QuickFix\u4e2d\u5220\u9664\u6240\u6709\u672a\u4f7f\u7528\u7684\u5bfc\u5165<\/li>\n<\/ul>\n<p>\u6211\u4eec\u5df2\u5c06\u6b64\u9009\u9879\u6dfb\u52a0\u5230QuickFix \uff08\u706f\u6ce1\u56fe\u6807\uff09\uff0c\u56e0\u6b64\u60a8\u53ef\u4ee5\u540c\u65f6\u5220\u9664\u6240\u6709\u672a\u4f7f\u7528\u7684\u5bfc\u5165\u3002<\/p>\n<ul>\n<li>QuickFix\u6dfb\u52a0\u6240\u6709\u7f3a\u5931\u7684\u5bfc\u5165<\/li>\n<\/ul>\n<p>\u5982\u679c\u6709\u672a\u89e3\u6790\u7684\u7c7b\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528QuickFix\u6dfb\u52a0\u6240\u6709\u7f3a\u5c11\u7684\u5bfc\u5165\u5e76\u4ece\u4e0b\u62c9\u5217\u8868\u4e2d\u9009\u62e9\u7c7b<\/p>\n<ul>\n<li>\u4eceSource Action\u83dc\u5355\u6dfb\u52a0\u6240\u6709\u7f3a\u5931\u7684\u5bfc\u5165<\/li>\n<\/ul>\n<p>\u53e6\u4e00\u79cd\u6dfb\u52a0\u6240\u6709\u7f3a\u5931\u5bfc\u5165\u7684\u65b9\u6cd5\u662f\u53f3\u952e\u5355\u51fb\u8c03\u51fa\u83dc\u5355\uff0c\u7136\u540e\u9009\u62e9\u201cSource Action\u201d\uff0c\u60a8\u4e5f\u4f1a\u5728\u90a3\u91cc\u770b\u5230\u201cAdd all missing imports\u201d\u3002<\/p>\n<p>\u8fd9\u662f\u4e0a\u8ff0\u6240\u6709\u529f\u80fd\u7684\u6f14\u793a<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/organizeimport.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-903\" src=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/organizeimport.gif\" alt=\"Organize import\" width=\"1454\" height=\"986\" \/><\/a><\/p>\n<p>\u6211\u4eec\u5c06\u7ee7\u7eed\u56f4\u7ed5\u201c\u7ec4\u7ec7\u5bfc\u5165\u201d\u573a\u666f\u6dfb\u52a0\u66f4\u591a\u6539\u8fdb\uff0c\u60a8\u53ef\u4ee5\u5728\u8fd9\u4e2a <a href=\"https:\/\/github.com\/redhat-developer\/vscode-java\/issues\/2748\">GitHub \u95ee\u9898<\/a>\u4e2d\u627e\u5230\u6211\u4eec\u6240\u6709\u7684\u672a\u6765\u8ba1\u5212\u3002\u8bf7\u968f\u65f6\u5728\u90a3\u91cc\u7559\u4e0b\u60a8\u7684\u53cd\u9988\u6216\u8bc4\u8bba\u3002<\/p>\n<h4><strong>\u8c03\u8bd5\u65b0\u529f\u80fd &#8211; Step Into Target (\u76f4\u63a5\u6b65\u5165\u51fd\u6570)<\/strong><\/h4>\n<p>\u8c03\u8bd5\u5305\u542b\u8bb8\u591a\u5d4c\u5957\u51fd\u6570\u8c03\u7528\u7684\u8bed\u53e5\u53ef\u80fd\u4f1a\u5f88\u9ebb\u70e6\uff0c\u56e0\u4e3a\u60a8\u53ef\u80fd\u4e0d\u5f97\u4e0d\u5355\u6b65\u6267\u884c\u60a8\u5e76\u4e0d\u771f\u6b63\u611f\u5174\u8da3\u7684\u51fd\u6570\u3002\u4e3a\u4e86\u6539\u5584\u8fd9\u79cd\u60c5\u51b5\uff0c\u8c03\u8bd5\u9002\u914d\u5668\u534f\u8bae\u652f\u6301\u4e86\u201cStep Into Target\u201d\u529f\u80fd\uff0c\u8be5\u529f\u80fd\u663e\u793a\u7528\u4e8e\u76f4\u63a5\u8fdb\u5165\u60a8\u611f\u5174\u8da3\u7684\u51fd\u6570\u7684 UI\u3002<\/p>\n<p>\u5728\u6211\u4eec\u6700\u65b0\u7684 Java \u63d2\u4ef6\u4e2d\uff0c\u6211\u4eec\u5df2\u7ecf\u5f00\u59cb\u652f\u6301\u6b64\u529f\u80fd\u3002\u5f53\u8c03\u8bd5\u5728\u8bed\u53e5\u4e0a\u505c\u6b62\u65f6\uff0c\u60a8\u53ef\u4ee5\u4ece\u83dc\u5355\u4e2d\u9009\u62e9\u201cStep Into Target\u201d\uff0c\u8fd9\u4f7f\u60a8\u53ef\u4ee5\u76f4\u63a5\u8fdb\u5165\u60a8\u611f\u5174\u8da3\u7684\u51fd\u6570\u6216\u76ee\u6807\u3002\u8fd9\u662f\u6b64\u529f\u80fd\u7684\u6f14\u793a\uff1a<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/stepintotarget.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-904\" src=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/stepintotarget.gif\" alt=\"Step into target\" width=\"2442\" height=\"1586\" \/><\/a><\/p>\n<h4><strong>Spring \u7ec4\u4ef6\u7684\u56fe\u793a<\/strong><\/h4>\n<p>Spring\u5f00\u53d1\u8005\u7684\u4f53\u9a8c\u4e00\u76f4\u662f\u6211\u4eec\u7684\u7126\u70b9\u3002\u8fd9\u4e00\u6b21\uff0c\u6211\u4eec\u4e3a\u7f16\u8f91\u533a\u57df\u6dfb\u52a0\u4e86\u4e00\u4e9b\u89c6\u89c9\u589e\u5f3a\u529f\u80fd\uff0c\u4ee5\u4fbf\u5f00\u53d1\u8005\u53ef\u4ee5\u66f4\u597d\u5730\u8bc6\u522b Spring \u7ec4\u4ef6\u5e76\u4e0e Spring Boot Dashboard\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<p>\u5f53\u60a8\u4f7f\u7528\u6700\u65b0\u7248\u672c\u7684 Spring Boot \u63d2\u4ef6\u5305\uff0c\u60a8\u4f1a\u5728\u7f16\u8f91\u5668\u533a\u57df\u4e2d\u7684 Spring bean \u548cEndpoint mapping\u65c1\u8fb9\u627e\u5230\u7eff\u8272\u56fe\u6807\u3002\u8fd9\u4e3a\u60a8\u63d0\u4f9b\u4e86\u8fd9\u662f\u4e00\u4e2a Spring \u7ec4\u4ef6\u7684\u89c6\u89c9\u7ebf\u7d22\u3002\u5f53\u60ac\u505c\u5728\u8fd9\u4e9b\u7ec4\u4ef6\u4e0a\u65f6\uff0c\u5c06\u5f39\u51fa\u4e00\u4e2a\u63d0\u793a\uff0c\u60a8\u5c06\u770b\u5230\u6709\u5173\u6b64\u7ec4\u4ef6\u7684\u4e00\u4e9b\u8be6\u7ec6\u4fe1\u606f\u4ee5\u53ca\u5728 Spring Boot Dashboard\u4e2d\u6253\u5f00\u5b83\u7684\u94fe\u63a5\u3002\u8fd9\u662f\u6b64\u529f\u80fd\u7684\u5feb\u901f\u6f14\u793a\u3002<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/springguttericon.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-905\" src=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/11\/springguttericon.gif\" alt=\"Spring gutter icon\" width=\"1436\" height=\"864\" \/><\/a><\/p>\n<h4><strong>\u5b89\u88c5 Java \u63d2\u4ef6\u5305<\/strong><\/h4>\n<p>\u8981\u4f7f\u7528\u4e0a\u8ff0\u6240\u6709\u529f\u80fd\uff0c\u8bf7\u5728 Visual Studio Code \u4e0a\u4e0b\u8f7d\u5e76\u5b89\u88c5<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\">Extension Pack for Java \u3002<\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/09\/javapack.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-819\" src=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/09\/javapack.png\" alt=\"Image javapack\" width=\"1215\" height=\"238\" srcset=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/09\/javapack.png 1215w, https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/09\/javapack-300x59.png 300w, https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/09\/javapack-1024x201.png 1024w, https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/09\/javapack-768x150.png 768w\" sizes=\"(max-width: 1215px) 100vw, 1215px\" \/><\/a><\/p>\n<p>\u5982\u679c\u60a8\u662f\u4e00\u4f4dSpring\u5f00\u53d1\u8005\uff0c\u5e76\u4e14\u6b63\u5728\u7f16\u5199Spring Boot\u76f8\u5173\u7684\u7a0b\u5e8f\uff0c\u60a8\u4e5f\u53ef\u4ee5\u4e0b\u8f7d\u5e76\u5b89\u88c5<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Pivotal.vscode-boot-dev-pack\">Spring Boot\u63d2\u4ef6\u5305<\/a>\uff0c\u83b7\u5f97\u4e0eSpring Boot\u6709\u5173\u7684\u4e13\u5c5e\u5f00\u53d1\u4f53\u9a8c<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/10\/spring.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-864\" src=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/10\/spring.png\" alt=\"Spring boot extension pack\" width=\"1221\" height=\"224\" srcset=\"https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/10\/spring.png 1221w, https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/10\/spring-300x55.png 300w, https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/10\/spring-1024x188.png 1024w, https:\/\/devblogs.microsoft.com\/java-ch\/wp-content\/uploads\/sites\/59\/2022\/10\/spring-768x141.png 768w\" sizes=\"(max-width: 1221px) 100vw, 1221px\" \/><\/a><\/p>\n<h4 id=\"try-it-out\" class=\"x-hidden-focus\"><strong><span class=\"\">\u53cd\u9988\u4e0e\u5efa\u8bae<\/span><\/strong><i class=\"fabric-icon fabric-icon--Link\" aria-hidden=\"true\"><\/i><\/h4>\n<p class=\"\">2022 \u5e74\uff0cVisual Studio Code \u4e0a\u7684 Java \u4f1a\u6709\u5f88\u591a\u6fc0\u52a8\u4eba\u5fc3\u7684\u66f4\u65b0\uff0c\u4e00\u5982\u65e2\u5f80\uff0c\u60a8\u7684\u53cd\u9988\u548c\u5efa\u8bae\u5bf9\u6211\u4eec\u975e\u5e38\u91cd\u8981\uff0c\u5c06\u6709\u52a9\u4e8e\u6211\u4eec\u672a\u6765\u7684\u4ea7\u54c1\u5851\u9020\u3002\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u7ed9\u6211\u4eec\u7559\u4e0b\u53cd\u9988<\/p>\n<ul>\n<li><a href=\"https:\/\/www.research.net\/r\/vscodejava?lang=zh\" target=\"_blank\" rel=\"noopener\">\u586b\u5199\u4e2d\u6587\u95ee\u5377<\/a><\/li>\n<li class=\"\">\u5728\u8fd9\u4e2a\u5e16\u5b50\u4e0b\u7559\u8a00<\/li>\n<li class=\"\">\u5728\u6211\u4eec\u7684GitHub repo\u4e0a<a href=\"https:\/\/github.com\/microsoft\/vscode-java-pack\/issues\/new\/choose\" target=\"_blank\" rel=\"noopener\">\u521b\u5efaIssue<\/a><\/li>\n<li>\u53d1\u9001\u7535\u5b50\u90ae\u4ef6\u5230<a href=\"mailto:vscjfeedback@microsoft.com\">vscjfeedback@microsoft.com<\/a><\/li>\n<\/ul>\n<h4 id=\"try-it-out\"><strong>\u8d44\u6e90<\/strong><i class=\"fabric-icon fabric-icon--Link\" aria-hidden=\"true\"><\/i><\/h4>\n<p>\u4ee5\u4e0b\u94fe\u63a5\u548c\u8d44\u6e90\u80fd\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u4e86\u89e3Java on Visual Studio Code\u7684\u76f8\u5173\u4fe1\u606f<\/p>\n<ul>\n<li class=\"\">\u4e86\u89e3<a href=\"https:\/\/code.visualstudio.com\/docs\/languages\/java\" target=\"_blank\" rel=\"noopener\">\u66f4\u591a Visual Studio Code\u4e0aJava<\/a>\u7684\u66f4\u591a\u4fe1\u606f<\/li>\n<li class=\"\"><span class=\"goog-text-highlight\">\u9010\u6b65\u63a2\u7d22<\/span><a href=\"https:\/\/code.visualstudio.com\/docs\/java\/java-tutorial\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"goog-text-highlight\">\u6709\u5173Visual Studio Code\u7684Java\u6559\u7a0b<\/span><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u4eec\u5f88\u9ad8\u5174\u4e0e\u5927\u5bb6\u5206\u4eab\u4e00\u4e2a\u597d\u6d88\u606f\uff0c\u73b0\u5728 Visual Studio Code \u4e0a\u5df2\u6709\u8d85\u8fc7 200 \u4e07 Java \u5f00\u53d1\u8005\uff0c\u8fd9\u8981\u6765\u81ea\u4e8e\u957f\u671f\u793e\u533a\u4ee5\u53ca\u7528\u6237\u7684\u652f\u6301\uff0c\u6240\u4ee5\u8c22\u8c22\u4f60\u4eec\uff01 \u5bf9\u4e8e 11 \u6708\u7684\u66f4\u65b0\uff0c\u6211\u4eec\u4e3a\u60a8\u5e26\u6765\u4e86\u5168\u65b0\u7684\u4ee3\u7801\u7f16\u8f91\u529f\u80fd\uff0c\u4f8b\u5982\u540e\u7f00\u8865\u5168\u3001\u4f18\u5316\u7684\u7ec4\u7ec7\u5bfc\u5165\u3002\u6b64\u5916\uff0c\u8c03\u8bd5\u5668\u5f97\u5230\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u66f4\u65b0\uff0c\u56e0\u4e3a\u6211\u4eec\u652f\u6301\u4e00\u4e2a\u540d\u4e3a\u201cStep Into Target\uff08\u76f4\u63a5\u8fdb\u5165\u51fd\u6570\uff09\u201d\u7684\u65b0\u529f\u80fd\u3002\u6700\u540e\uff0c\u6211\u4eec\u5bf9 Spring \u7ec4\u4ef6\u8fdb\u884c\u4e86\u4e00\u4e9b\u89c6\u89c9\u589e\u5f3a\uff0c\u8ba9\u6211\u4eec\u5f00\u59cb\u5427\u3002 \u540e\u7f00\u5b8c\u6210 \u540e\u7f00\u8865\u5168\u8ba9\u60a8\u53ef\u4ee5\u5728\u521a\u521a\u952e\u5165\u7684\u8868\u8fbe\u5f0f\u540e\u6dfb\u52a0\u4ee3\u7801\u7247\u6bb5\uff0c\u4ece\u800c\u63d0\u9ad8\u60a8\u7684\u5de5\u4f5c\u6548\u7387\u3002\u8fd9\u662fJetBrain\u4ea7\u54c1\u4e2d\u7684\u4e00\u9879\u6d41\u884c\u529f\u80fd\uff0c\u793e\u533a\u4e5f\u901a\u8fc7GitHub\u8981\u6c42\u6211\u4eec\u7684\u63d2\u4ef6\u63d0\u4f9b\u8fd9\u4e00\u9879\u529f\u80fd\u3002\u901a\u8fc7\u5bf9\u4e0a\u6e38\u7684\u4e00\u4e9b\u8c03\u67e5\u548c\u66f4\u6539\uff0c\u6211\u4eec\u5df2\u7ecf\u6211\u4eec\u7684\u6700\u65b0\u7248\u672c\u4e2d\u652f\u6301\u540e\u7f00\u8865\u5168\u3002 \u6211\u4eec\u76ee\u524d\u652f\u6301\u7684\u540e\u7f00\u5feb\u6377\u65b9\u5f0f\u5982\u4e0b\uff1a \u5feb\u6377\u952e \u6a21\u677f\u5185\u5bb9 \u63cf\u8ff0 cast ((SomeType) expr) \u5c06\u8868\u8fbe\u5f0f\u8f6c\u6362\u4e3a\u65b0\u7c7b\u578b else if (!expr) \u521b\u5efa\u4e00\u4e2a\u5426\u5b9a\u7684 if \u8bed\u53e5 for for (T item : expr) \u521b\u5efa\u4e00\u4e2a for \u8bed\u53e5 fori for (int i = 0; i &lt; expr.length; i++) \u521b\u5efa\u4e00\u4e2a\u904d\u5386\u6570\u7ec4\u7684 for \u8bed\u53e5 forr [&hellip;]<\/p>\n","protected":false},"author":31999,"featured_media":907,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,1,4,3],"tags":[],"class_list":["post-898","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","category-java-ch","category-open-source","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u4eec\u5f88\u9ad8\u5174\u4e0e\u5927\u5bb6\u5206\u4eab\u4e00\u4e2a\u597d\u6d88\u606f\uff0c\u73b0\u5728 Visual Studio Code \u4e0a\u5df2\u6709\u8d85\u8fc7 200 \u4e07 Java \u5f00\u53d1\u8005\uff0c\u8fd9\u8981\u6765\u81ea\u4e8e\u957f\u671f\u793e\u533a\u4ee5\u53ca\u7528\u6237\u7684\u652f\u6301\uff0c\u6240\u4ee5\u8c22\u8c22\u4f60\u4eec\uff01 \u5bf9\u4e8e 11 \u6708\u7684\u66f4\u65b0\uff0c\u6211\u4eec\u4e3a\u60a8\u5e26\u6765\u4e86\u5168\u65b0\u7684\u4ee3\u7801\u7f16\u8f91\u529f\u80fd\uff0c\u4f8b\u5982\u540e\u7f00\u8865\u5168\u3001\u4f18\u5316\u7684\u7ec4\u7ec7\u5bfc\u5165\u3002\u6b64\u5916\uff0c\u8c03\u8bd5\u5668\u5f97\u5230\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u66f4\u65b0\uff0c\u56e0\u4e3a\u6211\u4eec\u652f\u6301\u4e00\u4e2a\u540d\u4e3a\u201cStep Into Target\uff08\u76f4\u63a5\u8fdb\u5165\u51fd\u6570\uff09\u201d\u7684\u65b0\u529f\u80fd\u3002\u6700\u540e\uff0c\u6211\u4eec\u5bf9 Spring \u7ec4\u4ef6\u8fdb\u884c\u4e86\u4e00\u4e9b\u89c6\u89c9\u589e\u5f3a\uff0c\u8ba9\u6211\u4eec\u5f00\u59cb\u5427\u3002 \u540e\u7f00\u5b8c\u6210 \u540e\u7f00\u8865\u5168\u8ba9\u60a8\u53ef\u4ee5\u5728\u521a\u521a\u952e\u5165\u7684\u8868\u8fbe\u5f0f\u540e\u6dfb\u52a0\u4ee3\u7801\u7247\u6bb5\uff0c\u4ece\u800c\u63d0\u9ad8\u60a8\u7684\u5de5\u4f5c\u6548\u7387\u3002\u8fd9\u662fJetBrain\u4ea7\u54c1\u4e2d\u7684\u4e00\u9879\u6d41\u884c\u529f\u80fd\uff0c\u793e\u533a\u4e5f\u901a\u8fc7GitHub\u8981\u6c42\u6211\u4eec\u7684\u63d2\u4ef6\u63d0\u4f9b\u8fd9\u4e00\u9879\u529f\u80fd\u3002\u901a\u8fc7\u5bf9\u4e0a\u6e38\u7684\u4e00\u4e9b\u8c03\u67e5\u548c\u66f4\u6539\uff0c\u6211\u4eec\u5df2\u7ecf\u6211\u4eec\u7684\u6700\u65b0\u7248\u672c\u4e2d\u652f\u6301\u540e\u7f00\u8865\u5168\u3002 \u6211\u4eec\u76ee\u524d\u652f\u6301\u7684\u540e\u7f00\u5feb\u6377\u65b9\u5f0f\u5982\u4e0b\uff1a \u5feb\u6377\u952e \u6a21\u677f\u5185\u5bb9 \u63cf\u8ff0 cast ((SomeType) expr) \u5c06\u8868\u8fbe\u5f0f\u8f6c\u6362\u4e3a\u65b0\u7c7b\u578b else if (!expr) \u521b\u5efa\u4e00\u4e2a\u5426\u5b9a\u7684 if \u8bed\u53e5 for for (T item : expr) \u521b\u5efa\u4e00\u4e2a for \u8bed\u53e5 fori for (int i = 0; i &lt; expr.length; i++) \u521b\u5efa\u4e00\u4e2a\u904d\u5386\u6570\u7ec4\u7684 for \u8bed\u53e5 forr [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/posts\/898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/users\/31999"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/comments?post=898"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/posts\/898\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/media\/907"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/media?parent=898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/categories?post=898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java-ch\/wp-json\/wp\/v2\/tags?post=898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}