{"id":8921,"date":"2022-12-02T14:37:28","date_gmt":"2022-12-02T06:37:28","guid":{"rendered":"http:\/\/123.57.164.21\/?p=8921"},"modified":"2022-12-02T14:37:28","modified_gmt":"2022-12-02T06:37:28","slug":"%e5%ad%a6%e4%b9%a0-maven-%e8%bf%99%e4%b8%80%e7%af%87%e5%b0%b1%e5%a4%9f%e4%ba%86","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=8921","title":{"rendered":"\u5b66\u4e60 Maven \u8fd9\u4e00\u7bc7\u5c31\u591f\u4e86"},"content":{"rendered":"\n<p><strong>\u7b2c\u4e00\u7ae0 Maven \u7b80\u4ecb<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>1.1\u3001Maven \u6982\u8ff0<\/strong><\/p>\n\n\n\n<p>Maven \u662f\u4e00\u4e2a\u8f6f\u4ef6\u9879\u76ee\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u5bf9 Java \u9879\u76ee\u8fdb\u884c\u5168\u81ea\u52a8\u6784\u5efa\uff0c\u7ba1\u7406\u9879\u76ee\u6240\u9700\u8981\u7684\u4f9d\u8d56\u3002<\/p>\n\n\n\n<p>Maven \u66fe\u662f Jakarta \u9879\u76ee\u7684\u5b50\u9879\u76ee\uff0c\u73b0\u4e3a\u7531 Apache \u8f6f\u4ef6\u57fa\u91d1\u4f1a\u4e3b\u6301\u7684\u72ec\u7acb Apache \u9879\u76ee\u3002<\/p>\n\n\n\n<p><strong>1.2\u3001Maven \u7279\u70b9<\/strong><\/p>\n\n\n\n<ul><li>\u9075\u5faa\u6700\u4f73\u5b9e\u8df5\u7684\u7b80\u5355\u9879\u76ee\u8bbe\u7f6e\uff0c\u6570\u79d2\u5185\u5373\u53ef\u542f\u52a8\u65b0\u9879\u76ee\u6216\u6a21\u5757<\/li><li>\u5728\u6240\u6709\u9879\u76ee\u4e2d\u4f7f\u7528\u4e00\u81f4\uff0c\u610f\u5473\u7740\u65b0\u5f00\u53d1\u4eba\u5458\u65e0\u9700\u82b1\u8d39\u66f4\u591a\u65f6\u95f4\u6765\u53c2\u4e0e\u9879\u76ee<\/li><li>\u51fa\u8272\u7684\u4f9d\u8d56\u9879\u7ba1\u7406\uff0c\u5305\u62ec\u81ea\u52a8\u66f4\u65b0\uff0c\u4f9d\u8d56\u9879\u5173\u95ed\uff08\u4e5f\u79f0\u4e3a\u4f20\u9012\u4f9d\u8d56\u9879\uff09<\/li><li>\u80fd\u591f\u8f7b\u677e\u540c\u65f6\u5904\u7406\u591a\u4e2a\u9879\u76ee<\/li><li>\u5f00\u7bb1\u5373\u7528\u7684\u5e9e\u5927\u4e14\u4e0d\u65ad\u589e\u957f\u7684\u4f9d\u8d56\u5e93\uff0c\u5e76\u4e0e\u6700\u5927\u7684\u5f00\u6e90\u9879\u76ee\u8fdb\u884c\u4e86\u5b89\u6392\uff0c\u4ee5\u5b9e\u65f6\u63d0\u4f9b\u5176\u6700\u65b0\u7248\u672c<\/li><li>\u53ef\u6269\u5c55\uff0c\u80fd\u591f\u8f7b\u677e\u7528 Java \u6216\u811a\u672c\u8bed\u8a00\u7f16\u5199\u63d2\u4ef6<\/li><li>\u51e0\u4e4e\u65e0\u9700\u989d\u5916\u914d\u7f6e\u5373\u53ef\u7acb\u5373\u8bbf\u95ee\u65b0\u529f\u80fd<\/li><li>\u7528\u4e8e Maven \u4e4b\u5916\u7684\u4f9d\u8d56\u9879\u7ba1\u7406\u548c\u90e8\u7f72\u7684 Ant \u4efb\u52a1<\/li><li>\u57fa\u4e8e\u6a21\u578b\u7684\u6784\u5efa\uff0cMaven \u80fd\u591f\u5c06\u4efb\u4f55\u6570\u91cf\u7684\u9879\u76ee\u6784\u5efa\u4e3a\u9884\u5b9a\u4e49\u7684\u8f93\u51fa\u7c7b\u578b\uff0c\u4f8b\u5982 JAR\uff0cWAR<\/li><li>\u65e0\u9700\u592a\u591a\u989d\u5916\u914d\u7f6e\uff0cMaven \u5c06\u4e0e\u60a8\u7684\u6e90\u4ee3\u7801\u63a7\u5236\u7cfb\u7edf\uff08\u4f8b\u5982 Git\uff09\u96c6\u6210\uff0c\u5e76\u57fa\u4e8e\u7279\u5b9a\u6807\u7b7e\u7ba1\u7406\u9879\u76ee\u7684\u53d1\u5e03<\/li><\/ul>\n\n\n\n<p><strong>1.3\u3001Maven \u5b98\u7f51<\/strong><\/p>\n\n\n\n<p>Maven \u5b98\u65b9\u7f51\u5740\uff1ahttps:\/\/maven.apache.org\/<\/p>\n\n\n\n<p>Maven \u4f9d\u8d56\u641c\u7d22\uff1ahttps:\/\/mvnrepository.com\/<\/p>\n\n\n\n<p><strong>\u7b2c\u4e8c\u7ae0 Maven \u9879\u76ee\u7ed3\u6784<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>2.1\u3001\u6807\u51c6\u7ed3\u6784<\/strong><\/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=\"\">maven-demo\uff08\u9879\u76ee\u540d\u79f0\uff09\n|---------pom.xml\uff08\u9879\u76ee\u914d\u7f6e\u6587\u4ef6\uff09\n|---------src\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|---------main\uff08\u4e3b\u7a0b\u5e8f\u76ee\u5f55\uff09\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|---------java\uff08\u4e3b\u7a0b\u5e8f\u7684Java\u6e90\u6587\u4ef6\u76ee\u5f55\uff09\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|---------resources\uff08\u4e3b\u7a0b\u5e8f\u7684\u8d44\u6e90\u6587\u4ef6\u76ee\u5f55\uff09\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|---------test\uff08\u6d4b\u8bd5\u7a0b\u5e8f\u76ee\u5f55\uff09\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|---------java\uff08\u6d4b\u8bd5\u7a0b\u5e8f\u7684Java\u6e90\u6587\u4ef6\u76ee\u5f55\uff09\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|---------resources\uff08\u6d4b\u8bd5\u7a0b\u5e8f\u7684\u8d44\u6e90\u6587\u4ef6\u76ee\u5f55\uff09\u590d\u5236\u4ee3\u7801\n-----------------------------------<\/pre>\n\n\n\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c31\u6309\u7167\u6807\u51c6\u76ee\u5f55\u521b\u5efa\u4e00\u4e2a Maven\u5de5\u7a0b \uff0c\u521b\u5efa\u4f4d\u7f6e\uff0c\u4f60\u53ef\u4ee5\u4efb\u610f\u3002<\/p>\n\n\n\n<p>\u521b\u5efa\u5b8c\u6807\u51c6\u7ed3\u6784\u4ee5\u540e\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e9b\u4ee3\u7801\u548c\u914d\u7f6e\uff0c\u6765\u5e2e\u52a9\u6211\u4eec\u5b8c\u6210\u63a5\u4e0b\u6765\u7684\u5b66\u4e60\uff0c\u5728\u8fd9\u91cc\uff0c\u4f60\u53ef\u4ee5\u4e0d\u7406\u89e3\u8fd9\u4e9b\u4ee3\u7801\u548c\u914d\u7f6e\u7684\u542b\u4e49\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e9b\u4ee3\u7801\u548c\u914d\u7f6e\u5728\u8fd9\u4e00\u7ae0\u8282\u4e0d\u662f\u91cd\u70b9\uff0c\u540e\u8fb9\u4f1a\u8bb2\uff0c\u91cd\u70b9\u662f\u6807\u51c6\u7ed3\u6784\u957f\u4ec0\u4e48\u6837\u5b50\uff0c\u8fd9\u4e9b\u4ee3\u7801\u548c\u914d\u7f6e\u4e3b\u8981\u662f\u4e3a\u4e86\u5b66\u4e60\u63a5\u4e0b\u6765\u7684 Maven\u547d\u4ee4\u3002<\/p>\n\n\n\n<p>\u627e\u5230 pom.xml \u5728\u91cc\u8fb9\u5199\u5165\u4ee5\u4e0b\u914d\u7f6e\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=\"\">&lt;project\u00a0xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0\u00a0http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">\n\u00a0\u00a0&lt;modelVersion>4.0.0&lt;\/modelVersion>\n\n\u00a0\u00a0&lt;!--\u00a0groupId\u4e00\u822c\u4e3a\u516c\u53f8\u6216\u8005\u7ec4\u7ec7\u57df\u540d\u7684\u53cd\u5199\u00a0-->\n\u00a0\u00a0&lt;groupId>com.caochenlei&lt;\/groupId>\n\u00a0\u00a0&lt;!--\u00a0artifactId\u4e00\u822c\u4e3a\u5f53\u524d\u9879\u76ee\u6216\u8005\u6a21\u5757\u7684\u540d\u79f0\u00a0-->\n\u00a0\u00a0&lt;artifactId>maven-demo&lt;\/artifactId>\n\u00a0\u00a0&lt;!--\u00a0version\u4ee3\u8868\u5f53\u524d\u9879\u76ee\u6216\u8005\u6a21\u5757\u7684\u7248\u672c\u53f7\u00a0-->\n\u00a0\u00a0&lt;version>0.0.1-SNAPSHOT&lt;\/version>\n&lt;\/project>\u590d\u5236\u4ee3\u7801\n<\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u4ec5\u4ec5\u6f14\u793a\u4e86\u4e00\u4e2a\u6807\u51c6\u7684 maven \u5de5\u7a0b\u5e94\u8be5\u957f\u4ec0\u4e48\u6837\u5b50\uff0c\u5177\u4f53\u7684\u914d\u7f6e\u7b49\u5185\u5bb9\u4f1a\u5728\u540e\u8fb9\u8bb2\u89e3\u3002<\/p>\n\n\n\n<p><strong>2.2\u3001POM \u6587\u4ef6<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>POM \u662f Maven \u5de5\u7a0b\u7684\u57fa\u672c\u5de5\u4f5c\u5355\u5143\uff0c\u662f\u4e00\u4e2a XML \u6587\u4ef6\uff0c\u5305\u542b\u4e86\u9879\u76ee\u7684\u57fa\u672c\u4fe1\u606f\uff0c\u7528\u4e8e\u63cf\u8ff0\u9879\u76ee\u5982\u4f55\u6784\u5efa\uff0c\u58f0\u660e\u9879\u76ee\u4f9d\u8d56\u7b49\u7b49\u3002<\/p>\n\n\n\n<p>\u6267\u884c\u4efb\u52a1\u6216\u76ee\u6807\u65f6\uff0cMaven \u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e2d\u67e5\u627e POM\uff0c\u8bfb\u53d6 POM\uff0c\u83b7\u53d6\u6240\u9700\u7684\u914d\u7f6e\u4fe1\u606f\uff0c\u7136\u540e\u6267\u884c\u76ee\u6807\u3002<\/p>\n\n\n\n<p>POM \u4e2d\u53ef\u4ee5\u6307\u5b9a\u4ee5\u4e0b\u914d\u7f6e\u7b49\u7b49\uff1a<\/p>\n\n\n\n<ul><li>\u9879\u76ee\u914d\u7f6e<\/li><li>\u9879\u76ee\u7248\u672c<\/li><li>\u4f9d\u8d56\u7ba1\u7406<\/li><li>\u63d2\u4ef6\u7ba1\u7406<\/li><li>\u7248\u672c\u7ba1\u7406<\/li><li>\u6784\u5efa\u8bbe\u7f6e<\/li><\/ul>\n\n\n\n<p>\u6240\u6709 POM \u6587\u4ef6\u4e00\u822c\u90fd\u9700\u8981 project \u6839\u5143\u7d20\u548c\u4e09\u4e2a\u5fc5\u9700\u5b57\u6bb5\uff1agroupId\uff0cartifactId\uff0cversion\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-1024x383.png\" alt=\"\" class=\"wp-image-8922\" width=\"566\" height=\"212\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-1024x383.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-300x112.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-768x287.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-1536x575.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-830x311.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-230x86.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-350x131.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5-480x180.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-5.png 1678w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/figure><\/div>\n\n\n\n<p><strong>\u7b2c\u4e09\u7ae0 Maven \u4f9d\u8d56\u7ba1\u7406<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>3.1\u3001\u4f9d\u8d56\u5bfc\u5165<\/strong><\/p>\n\n\n\n<p>\u6bd4\u5982\u8bf4\uff0c\u6211\u4eec\u73b0\u5728\u9700\u8981\u5bfc\u5165\u4e00\u4e2a\u4e13\u95e8\u5904\u7406 JSON \u5b57\u7b26\u4e32\u7684\u4f9d\u8d56\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u53ea\u9700\u8981\u77e5\u9053\uff0c\u4f60\u6240\u8981\u5bfc\u5165\u7684\u5de5\u5177\u5305\u7684 groupId \u3001artifactId \u3001version \u8fd9\u4e09\u4e2a\u6807\u7b7e\u7684\u4fe1\u606f\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n\n\n\n<p>\u56e0\u4e3a\u4e00\u4e2a\u771f\u6b63\u7684\u9879\u76ee\u4e2d\uff0c\u4f9d\u8d56\u7edd\u4e0d\u6b62\u4e00\u4e2a\uff0c\u6240\u4ee5\u5728 pom.xml \u5c31\u7528\u4e86\u4f9d\u8d56\u7684\u82f1\u6587\u5355\u8bcd\u7684\u590d\u6570\u5f62\u5f0f\u6765\u7ba1\u7406\u4f9d\u8d56\u4fe1\u606f\uff0c\u5177\u4f53\u683c\u5f0f\u5982\u4e0b\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=\"\">&lt;project>\n\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0&lt;dependencies>\n\u00a0\u00a0\u00a0\u00a0&lt;dependency>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;groupId>com.alibaba&lt;\/groupId>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;artifactId>fastjson&lt;\/artifactId>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;version>1.2.75&lt;\/version>\n\u00a0\u00a0\u00a0\u00a0&lt;\/dependency>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u53ef\u6dfb\u52a0\u591a\u4e2a\u4f9d\u8d56\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0&lt;\/dependencies>\n\u00a0\u00a0\u00a0\u00a0...\n&lt;\/project>\u590d\u5236\u4ee3\u7801<\/pre>\n\n\n\n<p><strong>3.2\u3001\u4f9d\u8d56\u539f\u7406<\/strong><\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u4e0a\u8fb9\u77e5\u9053 groupId \u3001artifactId \u3001version \u8fd9\u4e09\u4e2a\u4fe1\u606f maven \u5c31\u80fd\u81ea\u52a8\u7ba1\u7406\u8fd9\u4e2a\u4f9d\u8d56\u4e86\uff0c\u5176\u5b9e\u539f\u7406\u5f88\u7b80\u5355\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u5f15\u5165\u4e86\u4f9d\u8d56\uff0cmaven \u5c31\u4f1a\u4f7f\u7528\u8fd9\u4e2a\u4f9d\u8d56\u7684\u4fe1\u606f\u62fc\u63a5\u5b57\u7b26\u4e32\uff0c\u5230 maven \u7684\u4e2d\u592e\u4ed3\u5e93\u53bb\u5bfb\u627e\u8fd9\u4e2a\u4f9d\u8d56\uff0c\u5e76\u628a\u5b83\u4e0b\u8f7d\u4e0b\u6765\u3002<\/p>\n\n\n\n<p>\u9ed8\u8ba4\u4e0b\u8f7d\u662f\u4e0b\u8f7d\u5230\u4e86\u7528\u6237\u7684\u6839\u76ee\u5f55\u4e0b\uff0c\u4e5f\u5c31\u662f ~\/.m2\/repository \u8fd9\u4e2a\u76ee\u5f55\u4e2d\uff0c\u6211\u4eec\u4e5f\u79f0\u8fd9\u4e2a\u76ee\u5f55\u4e3a\u672c\u5730\u4ed3\u5e93\u3002<\/p>\n\n\n\n<p>maven \u4e2d\u592e\u4ed3\u5e93\u7684\u5730\u5740\u662f\uff1a https:\/\/repo.maven.apache.org\/maven2\/<\/p>\n\n\n\n<p>maven \u62fc\u63a5\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\uff1a\u4ed3\u5e93\u5730\u5740\/{groupId}\/{artifactId}\/{version}\/{artifactId}-{version}.jar<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1agroupId \u9700\u8981\u628a\u6240\u5305\u542b\u7684\u6240\u6709\u70b9\u66ff\u6362\u6210\u659c\u6760<\/p>\n\n\n\n<p>\u5982\u679c\u662f\u5bfc\u5165\u4e0a\u8fb9\u7684 fastjson \uff0c\u90a3\u4e48\u8fd9\u4e2a\u4f9d\u8d56\u5728 maven \u4e2d\u592e\u4ed3\u5e93\u7684\u5730\u5740\u4e5f\u5c31\u662f\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=\"\">https:\/\/repo.maven.apache.org\/maven2\/com\/alibaba\/fastjson\/1.2.75\/fastjson-1.2.75.jar<\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u5730\u5740\u662f\u4e00\u4e2a\u7f51\u7edc\u5730\u5740\uff0c\u4f60\u53ef\u4ee5\u628a\u5b83\u590d\u5236\u5230\u6d4f\u89c8\u5668\u5730\u5740\u680f\u4e2d\uff0c\u7136\u540e\u56de\u8f66\u8bbf\u95ee\u4e00\u4e0b\uff0c\u8fd9\u4e2a\u4f9d\u8d56\u5c31\u80fd\u4e0b\u8f7d\u4e0b\u6765\u4e86\u3002<\/p>\n\n\n\n<p>\u4e5f\u6709\u53ef\u80fd\u4f60\u5e76\u4e0d\u80fd\u8bbf\u95ee\uff0c\u56e0\u4e3a maven \u7684\u4e2d\u592e\u4ed3\u5e93\u662f\u5728\u5916\u7f51\uff0c\u5728\u56fd\u5185\u8bbf\u95ee\u4f1a\u5f88\u6162\uff0c\u751a\u81f3\u6253\u4e0d\u5f00\u7b49\u60c5\u51b5\u3002<\/p>\n\n\n\n<p><strong>3.3\u3001\u66f4\u6362\u4ed3\u5e93<\/strong><\/p>\n\n\n\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e9b\u4e0d\u7a33\u5b9a\u7684\u60c5\u51b5\uff0c\u56fd\u5185\u5f88\u591a\u77e5\u540d\u7684\u5927\u516c\u53f8\uff0c\u6bd4\u5982\uff1a\u963f\u91cc\uff0c\u5b83\u4eec\u5c31\u81ea\u5df1\u521b\u5efa\u4e86\u4e00\u4e2a\u4ed3\u5e93\uff0c\u76f8\u5f53\u662f\u628a maven \u4e2d\u592e\u4ed3\u5e93\u91cc\u8fb9\u6240\u6709\u7684\u4f9d\u8d56\u5168\u90e8\u62f7\u5230\u4e86\u4ed6\u4eec\u81ea\u5df1\u7684\u4ed3\u5e93\u4e2d\uff0c\u5e76\u5b9e\u65f6\u66f4\u65b0\uff0c\u540c\u65f6\uff0c\u5411\u56fd\u4eba\u4e5f\u5f00\u653e\u4e86\u8fd9\u4e2a\u4ed3\u5e93\u7684\u5730\u5740\uff0c\u4e5f\u5c31\u662f \u963f\u91cc\u7684maven\u5e93 \u3002<\/p>\n\n\n\n<p>\u73b0\u5728\uff0cmaven \u9ed8\u8ba4\u662f\u4ece\u4e2d\u592e\u4ed3\u5e93\u53bb\u4e0b\u8f7d\uff0c\u6211\u4eec\u60f3\u8981\u6539\u53d8\u5b83\uff0c\u5c31\u5fc5\u987b\u544a\u8bc9\u4ed6\uff0c\u8bf4\u4f60\u4e0d\u8981\u53bb\u627e\u4e2d\u592e\u4ed3\u5e93\u4e86\uff0c\u592a\u6162\u4e86\uff0c\u4f60\u53bb\u963f\u91cc\u7684 maven \u5e93\u4e0b\u8f7d\u5427\uff0c\u65e2\u7136\u8981\u544a\u8bc9\u4ed6\uff0c\u6211\u4eec\u5c31\u9700\u8981\u914d\u7f6e\u4e00\u4e0b\u8fdc\u7a0b\u4ed3\u5e93\u5730\u5740\u3002<\/p>\n\n\n\n<p>\u627e\u5230\u89e3\u538b\u540e\u7684 maven \u76ee\u5f55\uff0c\u8fdb\u5165 conf \u76ee\u5f55\uff0c\u627e\u5230 settings \u6587\u4ef6\uff0c\u5728\u91cc\u8fb9\u627e\u5230 mirrors \u8282\u70b9\uff0c\u66ff\u6362\u6210\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n\n\n\n<p>\u4f8b\u5982\u6211\u7684\u662f\u5728\uff1a C:\\DevTools\\apache-maven-3.3.9\\conf\\settings.xml \uff0c\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528 VSCode \u7f16\u8f91\u5668\u6253\u5f00\uff0c\u5b83\u4f1a\u9ad8\u4eae\u6587\u5b57\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=\"\">&lt;mirrors>\n\u00a0\u00a0&lt;mirror>\n\u00a0\u00a0\u00a0\u00a0&lt;id>alimaven&lt;\/id>\n\u00a0\u00a0\u00a0\u00a0&lt;mirrorOf>central&lt;\/mirrorOf>\n\u00a0\u00a0\u00a0\u00a0&lt;name>aliyun\u00a0maven&lt;\/name>\n\u00a0\u00a0\u00a0\u00a0&lt;url>http:\/\/maven.aliyun.com\/nexus\/content\/groups\/public\/&lt;\/url>\n\u00a0\u00a0&lt;\/mirror>\n&lt;\/mirrors><\/pre>\n\n\n\n<p>\u540c\u65f6\uff0c\u56e0\u4e3a maven \u9ed8\u8ba4\u4f7f\u7528\u7684 JDK \u7f16\u8bd1\u7248\u672c\u4e3a JDK1.5\uff0c\u663e\u7136\u4e5f\u5e76\u4e0d\u7b26\u5408\u6211\u4eec\u7684\u8981\u6c42\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u9700\u8981\u91cd\u65b0\u6307\u5b9a\u7248\u672c\uff0c\u53ea\u9700\u8981\u627e\u5230 profiles \u8282\u70b9\uff0c\u66ff\u6362\u6210\u4ee5\u4e0b\u4fe1\u606f\u5373\u53ef\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=\"\">&lt;profiles>\n\u00a0\u00a0&lt;profile>\n\u00a0\u00a0\u00a0\u00a0&lt;id>jdk1.8&lt;\/id>\n\u00a0\u00a0\u00a0\u00a0&lt;activation>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;activeByDefault>true&lt;\/activeByDefault>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;jdk>1.8&lt;\/jdk>\n\u00a0\u00a0\u00a0\u00a0&lt;\/activation>\n\u00a0\u00a0\u00a0\u00a0&lt;properties>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;maven.compiler.source>1.8&lt;\/maven.compiler.source>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;maven.compiler.target>1.8&lt;\/maven.compiler.target>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;maven.compiler.compilerVersion>1.8&lt;\/maven.compiler.compilerVersion>\n\u00a0\u00a0\u00a0\u00a0&lt;\/properties>\n\u00a0\u00a0&lt;\/profile>\n&lt;\/profiles><\/pre>\n\n\n\n<p>\u597d\u4e86\uff0c\u73b0\u5728\u4ed3\u5e93\u5730\u5740\u4e5f\u66f4\u6539\u4e86\uff0c\u90a3\u5f53\u4ed6\u4e0b\u8f7d fastjson \u4f9d\u8d56\u7684\u65f6\u5019\uff0c\u4e0b\u8f7d\u5730\u5740\u5c31\u5e94\u8be5\u662f\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=\"\">http:\/\/maven.aliyun.com\/nexus\/content\/groups\/public\/com\/alibaba\/fastjson\/1.2.75\/fastjson-1.2.75.jar<\/pre>\n\n\n\n<p>\u4e3a\u4e86\u9a8c\u8bc1\uff0c\u4f60\u4e5f\u53ef\u4ee5\u628a\u8fd9\u4e2a\u5730\u5740\u7c98\u8d34\u5230\u6d4f\u89c8\u5668\u4e2d\uff0c\u56de\u8f66\uff0c\u770b\u770b\u5b83\u4f1a\u4e0d\u4f1a\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<p>\u5728\u4e0a\u8fb9\u6211\u4eec\u8fd8\u63d0\u5230\u4e86\u4e00\u4e2a\u672c\u5730\u4ed3\u5e93\uff0c\u5728\u672c\u5730\u4ed3\u5e93\u4e2d\uff0c\u4f60\u8981\u662f\u60f3\u8981\u627e\u5230\u8fd9\u4e2a\u4f9d\u8d56\u4e5f\u662f\u9075\u5faa maven \u7684\u62fc\u63a5\u5b57\u7b26\u4e32\u539f\u5219\uff0c\u90a3\u5c31\u6210\u4e86\u4ee5\u4e0b\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=\"\">C:\/Users\/CaoChenLei\/.m2\/repository\/com\/alibaba\/fastjson\/1.2.75\/fastjson-1.2.75.jar<\/pre>\n\n\n\n<p>C:\/Users\/{\u81ea\u5df1\u7684\u7528\u6237\u540d}\/.m2\/repository\/ \u4ee3\u8868\u7684\u5c31\u662f\u672c\u5730\u4ed3\u5e93\u7684\u5730\u5740\u3002<\/p>\n\n\n\n<p>\u5f53\u7136\uff0c\u73b0\u5728\u7684\u4f60\u53ef\u627e\u4e0d\u5230\u8fd9\u4e2a\u6587\u4ef6\u751a\u81f3\u76ee\u5f55\uff0c\u56e0\u4e3a\uff0c\u5728\u4e0a\u8fb9\u6211\u4eec\u53ea\u662f\u8bb2\u89e3\u4e86\u4f9d\u8d56\u662f\u600e\u4e48\u4e0b\u8f7d\u7684\u3002<\/p>\n\n\n\n<p>\u4f46\u662f\u73b0\u5728\uff0c\u6211\u4eec\u5e76\u6ca1\u6709\u5bfc\u5165\u4f9d\u8d56\uff0c\u4e5f\u6ca1\u6709\u5bf9 maven \u9879\u76ee\uff08\u2018maven-demo\u2019\uff09\u8fdb\u884c\u4efb\u4f55\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u4ed6\u53ef\u4e0d\u77e5\u9053\uff0c\u4f60\u6709\u8fd9\u4e48\u4e00\u4e2a\u4f9d\u8d56\u9700\u8981\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<p><strong>3.4\u3001\u5c0f\u7ed3\u4e00\u4e0b<\/strong><\/p>\n\n\n\n<p>\u5230\u8fd9\u91cc\uff0c\u7b80\u5355\u68b3\u7406\u4e00\u4e0b\uff0c\u672c\u7ae0\u8282\u4f60\u5b66\u4f1a\u4e86\uff1a<\/p>\n\n\n\n<ul><li>maven \u9879\u76ee\u5982\u4f55\u5bfc\u5165\u4f9d\u8d56\uff1f<\/li><\/ul>\n\n\n\n<p>\u5728 pom.xml \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u6807\u7b7e<\/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=\"\">&lt;project>\n\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0&lt;dependencies>\n\u00a0\u00a0\u00a0\u00a0&lt;dependency>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;groupId>com.alibaba&lt;\/groupId>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;artifactId>fastjson&lt;\/artifactId>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;version>1.2.75&lt;\/version>\n\u00a0\u00a0\u00a0\u00a0&lt;\/dependency>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0&lt;\/dependencies>\n\u00a0\u00a0\u00a0\u00a0...\n&lt;\/project>\n<\/pre>\n\n\n\n<ul><li>maven \u662f\u600e\u4e48\u4e0b\u8f7d\u4f9d\u8d56\u7684\uff1f<\/li><\/ul>\n\n\n\n<p>\u5229\u7528 groupId \u3001artifactId \u3001version \u62fc\u63a5\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u8bbf\u95ee\u4e0b\u8f7d<\/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=\"\">http:\/\/maven.aliyun.com\/nexus\/content\/groups\/public\/com\/alibaba\/fastjson\/1.2.75\/fastjson-1.2.75.jar<\/pre>\n\n\n\n<ul><li>\u4e2d\u592e\u4ed3\u5e93\uff1a maven \u5b98\u65b9\u7684\u3001\u6700\u5927\u7684\u4f9d\u8d56\uff08\u7b2c\u4e09\u65b9\u5f00\u6e90\u9879\u76ee\u3001\u5de5\u5177\u3001\u6846\u67b6\u3001\u63d2\u4ef6\u7b49\u7b49\uff09\u5b58\u653e\u4ed3\u5e93\uff0c\u4f46\u662f\uff0c\u56fd\u5185\u7528\u6237\u8bbf\u95ee\u901f\u5ea6\u6162<\/li><li>\u963f\u91cc\u4ed3\u5e93\uff1a \u963f\u91cc\u4ed3\u5e93\u4e5f\u79f0\u4e3a\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u5b83\u662f\u4e2d\u592e\u4ed3\u5e93\u7684\u4e00\u4efd\u5b9e\u65f6\u62f7\u8d1d\uff0c\u8bbf\u95ee\u901f\u5ea6\u5feb\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u4ed3\u5e93<\/li><li>\u672c\u5730\u4ed3\u5e93\uff1a maven \u4e0b\u8f7d\u4f9d\u8d56\u540e\uff0c\u7528\u4e8e\u5b58\u653e\u4f9d\u8d56\u7684\u5730\u65b9\uff0c\u5728\u9879\u76ee\u7684\u4f9d\u8d56\u7ba1\u7406\u4e2d\uff0c\u9996\u5148\u53bb\u672c\u5730\u4ed3\u5e93\u4e2d\u67e5\u627e\uff0c\u672c\u5730\u4ed3\u5e93\u4e2d\u6709\uff0c\u5219\u4f7f\u7528\uff0c\u6ca1\u6709\uff0c\u5219\u4e0b\u8f7d\uff0c\u7136\u540e\u5b58\u653e\u5230\u672c\u5730\u4ed3\u5e93\u4e2d\uff0c\u907f\u514d\u6bcf\u4e00\u6b21\u90fd\u4e0b\u8f7d\uff0c\u6d6a\u8d39\u7f51\u7edc\u5e26\u5bbd<\/li><\/ul>\n\n\n\n<p><strong>3.5\u3001\u5185\u5fc3\u7591\u95ee<\/strong><\/p>\n\n\n\n<p>\u4f60\u600e\u4e48\u77e5\u9053 groupId \u3001artifactId \u3001version \u8fd9\u4e09\u4e2a\u6807\u7b7e\u7684\u4fe1\u606f\uff1f<\/p>\n\n\n\n<p>\u6211\u4eec\u7ed9\u5927\u5bb6\u4e00\u4e2a\u7f51\u7ad9\uff1a mvnrepository.com\/<\/p>\n\n\n\n<p>\u73b0\u5728\u8bbf\u95ee\uff0c\u597d\u50cf\u9700\u8981\u9a8c\u8bc1\u7801\uff0c\u633a\u70e6\u4eba\u7684\uff0c\u6211\u4eec\u5c31\u4ee5 fastjson \u4e3a\u4f8b\uff0c\u4e3a\u5927\u5bb6\u8fdb\u884c\u6f14\u793a\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-1024x525.png\" alt=\"\" class=\"wp-image-8924\" width=\"557\" height=\"285\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-1024x525.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-300x154.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-768x394.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-1536x788.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-830x426.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-230x118.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-350x180.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6-480x246.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-6.png 1606w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-1024x553.png\" alt=\"\" class=\"wp-image-8926\" width=\"560\" height=\"302\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-1024x553.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-300x162.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-768x415.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-1536x829.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-830x448.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-230x124.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-350x189.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7-480x259.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-7.png 1582w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.6\u3001\u4f9d\u8d56\u8303\u56f4<\/strong><\/p>\n\n\n\n<p>\u4e00\u4e2a\u4f9d\u8d56\u662f\u6709\u81ea\u5df1\u7684\u4f5c\u7528\u8303\u56f4\u7684\uff0c\u4e00\u822c\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\u60c5\u51b5\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-8-561x1024.png\" alt=\"\" class=\"wp-image-8927\" width=\"332\" height=\"606\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-8-561x1024.png 561w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-8-164x300.png 164w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-8-230x420.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-8-350x639.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-8-480x876.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-8.png 594w\" sizes=\"(max-width: 332px) 100vw, 332px\" \/><\/figure><\/div>\n\n\n\n<p>\u5982\u4f55\u8bbe\u7f6e\u4e00\u4e2a\u4f9d\u8d56\u7684\u4f5c\u7528\u8303\u56f4\uff0c\u8bf7\u53c2\u8003\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=\"\">&lt;dependency>\n\t&lt;groupId>com.alibaba&lt;\/groupId>\n\t&lt;artifactId>fastjson&lt;\/artifactId>\n\t&lt;version>1.2.75&lt;\/version>\n\t&lt;!--\u00a0\u8bbe\u7f6e\u4f9d\u8d56\u8303\u56f4\uff0c\u4e3b\u8981\u53ef\u53d6\u503c\uff1acompile\u3001test\u3001provided\uff0c\u9ed8\u8ba4\u4e0d\u914d\u5c31\u662fcompile\u00a0\u00a0-->\n\t&lt;scope>compile&lt;\/scope>\n&lt;\/dependency>\u590d\u5236\u4ee3\u7801\n<\/pre>\n\n\n\n<p><strong>3.7\u3001\u4f9d\u8d56\u7684\u4f20\u9012\u6027<\/strong><\/p>\n\n\n\n<p>\u5047\u8bbe\uff0c\u73b0\u5728\u6709\u4e00\u4e2a Hello \u9879\u76ee\uff0c\u5b83\u5bfc\u5165\u4e86 spring-core \u4f9d\u8d56\uff0c\u800c\u5f00\u53d1 spring-core \u9700\u8981\u4f9d\u8d56 commons-logging \u4f9d\u8d56\uff1b<\/p>\n\n\n\n<p>\u8fd8\u5b58\u5728\u53e6\u5916\u4e00\u4e2a\u9879\u76ee HelloFriend \u4ed6\u4f9d\u8d56\u4e86 Hello \u9879\u76ee\uff0c\u5173\u7cfb\u5982\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9.png\" alt=\"\" class=\"wp-image-8928\" width=\"382\" height=\"158\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9.png 848w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9-300x125.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9-768x319.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9-830x345.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9-230x95.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9-350x145.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-9-480x199.png 480w\" sizes=\"(max-width: 382px) 100vw, 382px\" \/><\/figure><\/div>\n\n\n\n<p>\u4f9d\u8d56\u7684\u4f20\u9012\u6709\u4ec0\u4e48\u597d\u5904\uff1f<\/p>\n\n\n\n<p>\u53ef\u4ee5\u4f20\u9012\u7684\u4f9d\u8d56\u4e0d\u5fc5\u5728\u6bcf\u4e2a\u6a21\u5757\u5de5\u7a0b\u4e2d\u90fd\u91cd\u590d\u58f0\u660e\uff0c\u5728 \u201c\u6700\u4e0b\u9762\u201d \u7684\u5de5\u7a0b\u4e2d\u4f9d\u8d56\u4e00\u6b21\u5373\u53ef\u3002<\/p>\n\n\n\n<p><strong>3.8\u3001\u4f9d\u8d56\u7684\u6392\u9664<\/strong><\/p>\n\n\n\n<p>\u5047\u8bbe\uff0c\u73b0\u5728 commons-logging \u8fd9\u4e2a\u4f9d\u8d56\u5305\u662f\u6709\u95ee\u9898\u7684\u5305\uff0c\u6211\u4e0d\u60f3\u7ee7\u7eed\u4f7f\u7528\u4e86\uff0c\u8be5\u5982\u4f55\u6392\u9664\u5462\uff1f<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-1024x213.png\" alt=\"\" class=\"wp-image-8929\" width=\"467\" height=\"96\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-1024x213.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-300x62.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-768x160.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-830x172.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-230x48.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-350x73.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10-480x100.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-10.png 1300w\" sizes=\"(max-width: 467px) 100vw, 467px\" \/><\/figure><\/div>\n\n\n\n<p>\u6211\u4eec\u8fd9\u91cc\u6709\u4e00\u4efd\u53c2\u8003\u4ee3\u7801\uff0c\u8bf7\u60a8\u53c2\u8003\uff1a<\/p>\n\n\n\n<p>\u5728 HelloFriend \u5de5\u7a0b\u7684 pom.xml \u6587\u4ef6\u7684 dependencies \u6807\u7b7e\u5185\u5199\u5165\u4ee5\u4e0b\u4ee3\u7801<\/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=\"\">&lt;dependency>\n\t&lt;groupId>com.hello&lt;\/groupId>\n\t&lt;artifactId>hello&lt;\/artifactId>\n\t&lt;version>0.0.1-SNAPSHOT&lt;\/version>\n\t&lt;!--\u00a0\u7528\u6765\u6392\u9664\u4e0d\u60f3\u8981\u7684\u4f9d\u8d56\u5305\u00a0-->\n\t&lt;exclusions>\n\t\t&lt;exclusion>\n\t\t\t&lt;groupId>commons-logging&lt;\/groupId>\n\t\t\t&lt;artifactId>commons-logging&lt;\/artifactId>\n\t\t&lt;\/exclusion>\n\t&lt;\/exclusions>\n&lt;\/dependency><\/pre>\n\n\n\n<p><strong>3.9\u3001\u4f9d\u8d56\u7684\u539f\u5219<\/strong><\/p>\n\n\n\n<p>\u4f9d\u8d56\u7684\u539f\u5219\uff1a\u5b83\u662f\u4e3a\u4e86\u89e3\u51b3\u5de5\u7a0b\u6a21\u5757\u4e4b\u95f4\u7684 jar \u5305\u51b2\u7a81\u7684\u95ee\u9898\u7684\uff0c\u6211\u4eec\u65e0\u6cd5\u8bbe\u7f6e\uff0cmaven \u6709\u9ed8\u8ba4\u7684\u539f\u5219\uff0c\u6211\u4eec\u9700\u8981\u4e86\u89e3\u3002<\/p>\n\n\n\n<ul><li>\u539f\u5219\u4e00\uff1a\u8def\u5f84\u6700\u77ed\u8005\u4f18\u5148<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-1024x255.png\" alt=\"\" class=\"wp-image-8930\" width=\"397\" height=\"99\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-1024x255.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-300x75.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-768x191.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-830x206.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-230x57.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-350x87.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11-480x119.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-11.png 1182w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u539f\u5219\u4e8c\uff1a\u9a8c\u8bc1\u8def\u5f84\u76f8\u540c\u65f6\uff0c\u5148\u58f0\u660e\u8005\u4f18\u5148<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-1024x291.png\" alt=\"\" class=\"wp-image-8931\" width=\"428\" height=\"121\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-1024x291.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-300x85.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-768x218.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-830x236.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-230x65.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-350x99.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12-480x136.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-12.png 1120w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.10\u3001\u4f9d\u8d56\u7684\u7ee7\u627f<\/strong><\/p>\n\n\n\n<p>\u7531\u4e8e\u975e compile \u8303\u56f4\u7684\u4f9d\u8d56\u4fe1\u606f\u662f\u4e0d\u80fd\u5728 \u201c\u4f9d\u8d56\u94fe\u201d \u4e2d\u4f20\u9012\u7684\uff0c\u6240\u4ee5\u6709\u9700\u8981\u7684\u5de5\u7a0b\u53ea\u80fd\u5355\u72ec\u914d\u7f6e\u3002\u4f8b\u5982\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=\"\">&lt;dependency>\n\u00a0\u00a0\u00a0\u00a0&lt;groupId>junit&lt;\/groupId>\n\u00a0\u00a0\u00a0\u00a0&lt;artifactId>junit&lt;\/artifactId>\n\u00a0\u00a0\u00a0\u00a0&lt;version>4.0&lt;\/version>\n\u00a0\u00a0\u00a0\u00a0&lt;scope>test&lt;\/scope>\n&lt;\/dependency><\/pre>\n\n\n\n<p>\u6b64\u65f6\u5982\u679c\u9879\u76ee\u9700\u8981\u5c06\u5404\u4e2a\u6a21\u5757\u7684 junit \u7248\u672c\u7edf\u4e00\u4e3a 4.9\uff0c\u90a3\u4e48\u5230\u5404\u4e2a\u5de5\u7a0b\u4e2d\u624b\u52a8\u4fee\u6539\u65e0\u7591\u662f\u975e\u5e38\u4e0d\u53ef\u53d6\u7684\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u7ee7\u627f\u673a\u5236\u5c31\u53ef\u4ee5\u5c06\u8fd9\u6837\u7684\u4f9d\u8d56\u4fe1\u606f\u7edf\u4e00\u63d0\u53d6\u5230\u7236\u5de5\u7a0b\u6a21\u5757\u4e2d\u8fdb\u884c\u7edf\u4e00\u7ba1\u7406\u3002<\/p>\n\n\n\n<p>\u521b\u5efa\u7236\u5de5\u7a0b\u548c\u521b\u5efa\u4e00\u822c\u7684 Java \u5de5\u7a0b\u64cd\u4f5c\u4e00\u81f4\uff0c\u552f\u4e00\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1a\u6253\u5305\u65b9\u5f0f\u5904\u8981\u8bbe\u7f6e\u4e3a pom\u3002<\/p>\n\n\n\n<p>\u800c\u5728\u5b50\u5de5\u7a0b\u4e2d\u53ea\u9700\u8981\u5f15\u5165\u7236\u5de5\u7a0b\u7684\u5de5\u7a0b\u5750\u6807\u5c31\u53ef\u4ee5\u4e86\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=\"\">&lt;parent>\n\u00a0\u00a0\u00a0\u00a0&lt;!--\u00a0\u7236\u5de5\u7a0b\u5750\u6807\u00a0-->\n\u00a0\u00a0\u00a0\u00a0&lt;groupId>...&lt;\/groupId>\n\u00a0\u00a0\u00a0\u00a0&lt;artifactId>Parent&lt;\/artifactId>\n\u00a0\u00a0\u00a0\u00a0&lt;version>0.0.1-SNAPSHOT&lt;\/version>\n\u00a0\u00a0\u00a0\u00a0&lt;!--\u00a0\u6307\u5b9a\u4ece\u5f53\u524d\u5b50\u5de5\u7a0b\u7684pom.xml\u6587\u4ef6\u51fa\u53d1\uff0c\u67e5\u627e\u7236\u5de5\u7a0b\u7684pom.xml\u7684\u8def\u5f84\u00a0-->\n\u00a0\u00a0\u00a0\u00a0&lt;relativePath>..\/Parent\/pom.xml&lt;\/relativePath>\n&lt;\/parent><\/pre>\n\n\n\n<p>\u6b64\u65f6\u5982\u679c\u5b50\u5de5\u7a0b\u7684 groupId \u548c version \u548c\u7236\u5de5\u7a0b\u91cd\u590d\u5219\u53ef\u4ee5\u5220\u9664\u3002<\/p>\n\n\n\n<p>\u5c06 Parent \u9879\u76ee\u4e2d\u7684 dependencies \u6807\u7b7e\uff0c\u7528 dependencyManagement \u6807\u7b7e\u62ec\u8d77\u6765\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=\"\">&lt;dependencyManagement>\n\u00a0\u00a0\u00a0\u00a0&lt;dependencies>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;dependency>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;groupId>junit&lt;\/groupId>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;artifactId>junit&lt;\/artifactId>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;version>4.9&lt;\/version>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;scope>test&lt;\/scope>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\/dependency>\n\u00a0\u00a0\u00a0\u00a0&lt;\/dependencies>\n&lt;\/dependencyManagement>\u590d\u5236\u4ee3\u7801\n<\/pre>\n\n\n\n<p>\u5728\u5b50\u9879\u76ee\u4e2d\u91cd\u65b0\u6307\u5b9a\u9700\u8981\u7684\u4f9d\u8d56\uff0c\u5220\u9664\u8303\u56f4\u548c\u7248\u672c\u53f7\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=\"\">&lt;dependencies>\n\u00a0\u00a0\u00a0\u00a0&lt;dependency>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;groupId>junit&lt;\/groupId>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;artifactId>junit&lt;\/artifactId>\n\u00a0\u00a0\u00a0\u00a0&lt;\/dependency>\n&lt;\/dependencies><\/pre>\n\n\n\n<p><strong>\u7b2c\u56db\u7ae0 Maven \u751f\u547d\u5468\u671f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u6ce8\u610f\uff1a\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u7565\u7248\u7684\u751f\u547d\u5468\u671f\uff0c\u8db3\u591f\u6211\u4eec\u5b66\u4e60\u4e86\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=\"\">\u6e05\u7406\uff1a\u5220\u9664\u4ee5\u524d\u7684\u7f16\u8bd1\u7ed3\u679c\uff0c\u4e3a\u91cd\u65b0\u7f16\u8bd1\u505a\u597d\u51c6\u5907\u3002\n\u7f16\u8bd1\uff1a\u5c06 Java \u6e90\u7a0b\u5e8f\u7f16\u8bd1\u4e3a\u5b57\u8282\u7801\u6587\u4ef6\u3002\n\u6d4b\u8bd5\uff1a\u9488\u5bf9\u9879\u76ee\u4e2d\u7684\u5173\u952e\u70b9\u8fdb\u884c\u6d4b\u8bd5\uff0c\u786e\u4fdd\u9879\u76ee\u5728\u8fed\u4ee3\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u5173\u952e\u70b9\u7684\u6b63\u786e\u6027\uff0c\u5728\u6bcf\u6b21\u6d4b\u8bd5\u540e\u4ee5\u6807\u51c6\u683c\u5f0f\u8bb0\u5f55\u548c\u5c55\u793a\u6d4b\u8bd5\u7ed3\u679c\u3002\n\u6253\u5305\uff1a\u5c06\u4e00\u4e2a\u5305\u542b\u8bf8\u591a\u6587\u4ef6\u7684\u5de5\u7a0b\u5c01\u88c5\u4e3a\u4e00\u4e2a\u538b\u7f29\u6587\u4ef6\u7528\u4e8e\u5b89\u88c5\u6216\u90e8\u7f72\u3002Java \u5de5\u7a0b\u5bf9\u5e94 jar \u5305\uff0cWeb \u5de5\u7a0b\u5bf9\u5e94 war \u5305\u3002\n\u5b89\u88c5\uff1a\u5728 Maven \u73af\u5883\u4e0b\u7279\u6307\u5c06\u6253\u5305\u7684\u7ed3\u679c\uff08jar \u5305\u6216 war \u5305\uff09\u5b89\u88c5\u5230\u672c\u5730\u4ed3\u5e93\u4e2d\u3002\n\u53d1\u5e03\uff1a\u5c06\u6253\u5305\u7684\u7ed3\u679c\u90e8\u7f72\u5230\u8fdc\u7a0b\u4ed3\u5e93\u6216\u5c06 war \u5305\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u3002<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-1024x193.png\" alt=\"\" class=\"wp-image-8933\" width=\"544\" height=\"102\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-1024x193.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-300x57.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-768x145.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-1536x290.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-830x157.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-230x43.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-350x66.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13-480x91.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-13.png 1610w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/figure><\/div>\n\n\n\n<p>\u5f53\u6267\u884c compile \u7684\u65f6\u5019\uff0c\u4f1a\u6267\u884c\u4ece\u5de6\u5411\u53f3\u4f9d\u6b21\u6267\u884c compile<\/p>\n\n\n\n<p>\u5f53\u6267\u884c test \u7684\u65f6\u5019\uff0c\u4f1a\u6267\u884c\u4ece\u5de6\u5411\u53f3\u4f9d\u6b21\u6267\u884c compile\u3001test<\/p>\n\n\n\n<p>\u5f53\u6267\u884c package \u7684\u65f6\u5019\uff0c\u4f1a\u6267\u884c\u4ece\u5de6\u5411\u53f3\u4f9d\u6b21\u6267\u884c compile\u3001test\u3001package<\/p>\n\n\n\n<p>\u5f53\u6267\u884c install \u7684\u65f6\u5019\uff0c\u4f1a\u6267\u884c\u4ece\u5de6\u5411\u53f3\u4f9d\u6b21\u6267\u884c compile\u3001test\u3001package\u3001install<\/p>\n\n\n\n<p>\u5f53\u6267\u884c deploy \u7684\u65f6\u5019\uff0c\u4f1a\u6267\u884c\u4ece\u5de6\u5411\u53f3\u4f9d\u6b21\u6267\u884c compile\u3001test\u3001package\u3001install\u3001deploy<\/p>\n\n\n\n<p>\u8fd0\u884c\u4efb\u4f55\u4e00\u4e2a\u9636\u6bb5\u7684\u65f6\u5019\uff0c\u5b83\u524d\u9762\u7684\u6240\u6709\u9636\u6bb5\u90fd\u4f1a\u88ab\u8fd0\u884c\uff0c\u4f8b\u5982\u6211\u4eec\u8fd0\u884c mvn install \u7684\u65f6\u5019\uff0c\u4ee3\u7801\u4f1a\u88ab \u7f16\u8bd1\uff0c\u6d4b\u8bd5\uff0c\u6253\u5305\u3002<\/p>\n\n\n\n<p>\u8fd9\u5c31\u662f Maven \u4e3a\u4ec0\u4e48\u80fd\u591f\u81ea\u52a8\u6267\u884c\u6784\u5efa\u8fc7\u7a0b\u7684\u5404\u4e2a\u73af\u8282\u7684\u539f\u56e0\u3002<\/p>\n\n\n\n<p>\u6b64\u5916\uff0cMaven \u7684\u63d2\u4ef6\u673a\u5236\u662f\u5b8c\u5168\u4f9d\u8d56 Maven \u7684\u751f\u547d\u5468\u671f\u7684\uff0c\u56e0\u6b64\u7406\u89e3\u751f\u547d\u5468\u671f\u81f3\u5173\u91cd\u8981\u3002<\/p>\n\n\n\n<p><strong>\u7b2c\u4e94\u7ae0 Maven \u63d2\u4ef6\u7ba1\u7406<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>5.1\u3001\u63d2\u4ef6\u6982\u8ff0<\/strong><\/p>\n\n\n\n<p>Maven \u7684\u6838\u5fc3\u4ec5\u4ec5\u5b9a\u4e49\u4e86\u62bd\u8c61\u7684\u751f\u547d\u5468\u671f\uff0c\u5177\u4f53\u7684\u4efb\u52a1\u90fd\u662f\u4ea4\u7531\u63d2\u4ef6\u5b8c\u6210\u7684\u3002<\/p>\n\n\n\n<p>\u6bcf\u4e2a\u63d2\u4ef6\u90fd\u80fd\u5b9e\u73b0\u591a\u4e2a\u529f\u80fd\uff0c\u6bcf\u4e2a\u529f\u80fd\u5c31\u662f\u4e00\u4e2a\u63d2\u4ef6\u76ee\u6807\u3002<\/p>\n\n\n\n<p>Maven \u7684\u751f\u547d\u5468\u671f\u4e0e\u63d2\u4ef6\u76ee\u6807\u76f8\u4e92\u7ed1\u5b9a\uff0c\u4ee5\u5b8c\u6210\u67d0\u4e2a\u5177\u4f53\u7684\u6784\u5efa\u4efb\u52a1\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff1acompile \u5c31\u662f\u63d2\u4ef6 maven-compiler-plugin \u7684\u4e00\u4e2a\u76ee\u6807<\/p>\n\n\n\n<p>Maven \u6709\u4ee5\u4e0b\u4e09\u4e2a\u6807\u51c6\u7684\u751f\u547d\u5468\u671f\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=\"\">clean\uff1a\u9879\u76ee\u6e05\u7406\u7684\u5904\u7406\ndefault(\u6216 build)\uff1a\u9879\u76ee\u90e8\u7f72\u7684\u5904\u7406\nsite\uff1a\u9879\u76ee\u7ad9\u70b9\u6587\u6863\u521b\u5efa\u7684\u5904\u7406\uff08\u4e00\u822c\u4e0d\u7528\uff0c\u6240\u4ee5\u751f\u547d\u5468\u671f\u6ca1\u63d0\uff09<\/pre>\n\n\n\n<p>\u6bcf\u4e2a\u751f\u547d\u5468\u671f\u4e2d\u90fd\u5305\u542b\u7740\u4e00\u7cfb\u5217\u7684\u9636\u6bb5\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e9b\u9636\u6bb5\u5c31\u76f8\u5f53\u4e8e Maven \u63d0\u4f9b\u7684\u7edf\u4e00\u7684\u63a5\u53e3\uff0c\u7136\u540e\u8fd9\u4e9b\u9636\u6bb5\u7684\u5b9e\u73b0\u7531 Maven \u7684\u63d2\u4ef6\u6765\u5b8c\u6210\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5728\u8f93\u5165 mvn \u547d\u4ee4\u7684\u65f6\u5019 \u6bd4\u5982 mvn clean\uff0cclean \u5bf9\u5e94\u7684\u5c31\u662f Clean \u751f\u547d\u5468\u671f\u4e2d\u7684 clean \u9636\u6bb5\u3002<\/p>\n\n\n\n<p>\u4f46\u662f clean \u7684\u5177\u4f53\u64cd\u4f5c\u662f\u7531 maven-clean-plugin \uff08\u5185\u7f6e\u4e86\uff0c\u4e0d\u7528\u6211\u4eec\u624b\u52a8\u6dfb\u52a0\uff09\u6765\u5b9e\u73b0\u7684\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u8bf4 Maven \u751f\u547d\u5468\u671f\u7684\u6bcf\u4e00\u4e2a\u9636\u6bb5\u7684\u5177\u4f53\u5b9e\u73b0\u90fd\u662f\u7531 Maven \u63d2\u4ef6\u5b9e\u73b0\u7684\u3002<\/p>\n\n\n\n<p>Maven \u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u4f9d\u8d56\u63d2\u4ef6\u6267\u884c\u7684\u6846\u67b6\uff0c\u6bcf\u4e2a\u4efb\u52a1\u5b9e\u9645\u4e0a\u662f\u7531\u63d2\u4ef6\u5b8c\u6210\u3002<\/p>\n\n\n\n<p>Maven \u63d2\u4ef6\u901a\u5e38\u88ab\u7528\u6765\uff1a<\/p>\n\n\n\n<ul><li>\u521b\u5efa jar \u6587\u4ef6<\/li><li>\u521b\u5efa war \u6587\u4ef6<\/li><li>\u7f16\u8bd1\u4ee3\u7801\u6587\u4ef6<\/li><li>\u4ee3\u7801\u5355\u5143\u6d4b\u8bd5<\/li><li>\u521b\u5efa\u5de5\u7a0b\u6587\u6863<\/li><li>\u521b\u5efa\u5de5\u7a0b\u62a5\u544a<\/li><\/ul>\n\n\n\n<p>Maven \u63d0\u4f9b\u4e86\u4e0b\u9762\u4e24\u79cd\u7c7b\u578b\u7684\u63d2\u4ef6\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-1024x163.png\" alt=\"\" class=\"wp-image-8934\" width=\"506\" height=\"79\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-300x48.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-768x122.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-1536x244.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-830x132.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-230x37.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-350x56.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14-480x76.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-14.png 1648w\" sizes=\"(max-width: 506px) 100vw, 506px\" \/><\/figure><\/div>\n\n\n\n<p><strong>5.2\u3001\u63d2\u4ef6\u914d\u7f6e<\/strong><\/p>\n\n\n\n<p>\u6211\u4eec\u63a5\u4e0b\u6765\u4e3b\u8981\u8bb2\u89e3\u5728\u5de5\u7a0b POM.XML \u6587\u4ef6\u4e2d\u5982\u4f55\u914d\u7f6e\u4e00\u4e2a\u63d2\u4ef6\uff1f<\/p>\n\n\n\n<p>\u627e\u5230 POM.XML \u5728\u6839\u6807\u7b7e\u5185\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff0c\u63d2\u4ef6\u540d\u548c\u7248\u672c\u4ec5\u4f9b\u53c2\u8003\uff0c\u5177\u4f53\u6dfb\u52a0\u4ec0\u4e48\u63d2\u4ef6\uff0c\u53d6\u51b3\u4e8e\u4f60\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=\"\">&lt;build>\n\t&lt;plugins>\n\t\t&lt;!--\u00a0\u7f16\u8bd1\u63d2\u4ef6\u00a0-->\n\t\t&lt;plugin>\n\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\n\t\t\t&lt;artifactId>maven-compiler-plugin&lt;\/artifactId>\n\t\t\t&lt;version>3.2&lt;\/version>\n\t\t\t&lt;configuration>\n\t\t\t\t&lt;source>1.8&lt;\/source>\n\t\t\t\t&lt;target>1.8&lt;\/target>\n\t\t\t\t&lt;encoding>UTF-8&lt;\/encoding>\n\t\t\t&lt;\/configuration>\n\t\t&lt;\/plugin>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\n\t&lt;\/plugins>\n&lt;\/build>\n<\/pre>\n\n\n\n<p><strong>5.3\u3001\u5e38\u7528\u63d2\u4ef6<\/strong><\/p>\n\n\n\n<ul><li>maven-resources-plugin<\/li><\/ul>\n\n\n\n<p>\u63d2\u4ef6\u63cf\u8ff0\uff1a\u8be5\u63d2\u4ef6\u5904\u7406\u9879\u76ee\u7684\u8d44\u6e90\u6587\u4ef6\u62f7\u8d1d\u5230\u8f93\u51fa\u76ee\u5f55\uff0c\u53ef\u4ee5\u5206\u522b\u5904\u7406 main resources \u548c test resources\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=\"\">&lt;build>\n\t&lt;plugins>\n\t\t&lt;!--\u00a0\u4f9d\u8d56\u63d2\u4ef6\u00a0-->\n\t\t&lt;plugin>\n\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\n\t\t\t&lt;artifactId>maven-resources-plugin&lt;\/artifactId>\n\t\t\t&lt;version>3.0.1&lt;\/version>\n\t\t\t&lt;configuration>\n\t\t\t\t&lt;encoding>UTF-8&lt;\/encoding>\n\t\t\t&lt;\/configuration>\n\t\t&lt;\/plugin>\n\t&lt;\/plugins>\n&lt;\/build>\n<\/pre>\n\n\n\n<ul><li>maven-compiler-plugin<\/li><\/ul>\n\n\n\n<p>\u63d2\u4ef6\u63cf\u8ff0\uff1a\u8bbe\u7f6e maven \u7f16\u8bd1\u7684 jdk \u7248\u672c\uff0cmaven3 \u9ed8\u8ba4\u7528 jdk1.5\uff0cmaven2 \u9ed8\u8ba4\u7528 jdk1.3\uff0c\u9664\u4e86\u914d\u7f6emaven\u5b89\u88c5\u76ee\u5f55\/config\/settings.xml\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 maven-compiler-plugin \u8fdb\u884c\u6307\u5b9a<\/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=\"\">&lt;build>\n\t&lt;plugins>\n\t\t&lt;!--\u00a0\u4f9d\u8d56\u63d2\u4ef6\u00a0-->\n\t\t&lt;plugin>\n\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\n\t\t\t&lt;artifactId>maven-compiler-plugin&lt;\/artifactId>\n\t\t\t&lt;version>3.2&lt;\/version>\n\t\t\t&lt;configuration>\n\t\t\t\t&lt;source>1.8&lt;\/source>\n\t\t\t\t&lt;target>1.8&lt;\/target>\n\t\t\t\t&lt;encoding>UTF-8&lt;\/encoding>\n\t\t\t&lt;\/configuration>\n\t\t&lt;\/plugin>\n\t&lt;\/plugins>\n&lt;\/build>\n<\/pre>\n\n\n\n<ul><li>maven-source-plugin<\/li><\/ul>\n\n\n\n<p>\u63d2\u4ef6\u63cf\u8ff0\uff1a\u8be5\u63d2\u4ef6\u5904\u7406\u6253\u5305\u9879\u76ee\u7684\u6e90\u4ee3\u7801\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=\"\">&lt;build>\n\t&lt;plugins>\n\t\t&lt;!--\u00a0\u4f9d\u8d56\u63d2\u4ef6\u00a0-->\n\t\t&lt;plugin>\n\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\n\t\t\t&lt;artifactId>maven-source-plugin&lt;\/artifactId>\n\t\t\t&lt;executions>\n\t\t\t\t&lt;execution>\n\t\t\t\t\t&lt;id>attach-sources&lt;\/id>\n\t\t\t\t\t&lt;goals>\n\t\t\t\t\t\t&lt;goal>jar&lt;\/goal>\n\t\t\t\t\t&lt;\/goals>\n\t\t\t\t&lt;\/execution>\n\t\t\t&lt;\/executions>\n\t\t&lt;\/plugin>\n\t&lt;\/plugins>\n&lt;\/build>\n<\/pre>\n\n\n\n<ul><li>maven-dependency-plugin<\/li><\/ul>\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=\"\">&lt;build>\n\t&lt;plugins>\n\t\t&lt;!--\u00a0\u4f9d\u8d56\u63d2\u4ef6\u00a0-->\n\t\t&lt;plugin>\n\t\t\t&lt;groupId>org.apache.maven.plugins&lt;\/groupId>\n\t\t\t&lt;artifactId>maven-dependency-plugin&lt;\/artifactId>\n\t\t\t&lt;version>2.6&lt;\/version>\n\t\t\t&lt;executions>\n\t\t\t\t&lt;execution>\n\t\t\t\t\t&lt;id>copy-dependencies&lt;\/id>\n\t\t\t\t\t&lt;phase>compile&lt;\/phase>\n\t\t\t\t\t&lt;goals>\n\t\t\t\t\t\t&lt;goal>copy-dependencies&lt;\/goal>\n\t\t\t\t\t&lt;\/goals>\n\t\t\t\t\t&lt;configuration>\n\t\t\t\t\t\t&lt;!--\u00a0${project.build.directory}\u4e3aMaven\u5185\u7f6e\u53d8\u91cf\uff0c\u7f3a\u7701\u4e3atarget\u00a0-->\n\t\t\t\t\t\t&lt;outputDirectory>${project.build.directory}\/lib&lt;\/outputDirectory>\n\t\t\t\t\t\t&lt;!--\u00a0\u8868\u793a\u662f\u5426\u4e0d\u5305\u542b\u95f4\u63a5\u4f9d\u8d56\u7684\u5305\u00a0-->\n\t\t\t\t\t\t&lt;excludeTransitive>false&lt;\/excludeTransitive>\n\t\t\t\t\t\t&lt;!--\u00a0\u8868\u793a\u590d\u5236\u7684jar\u6587\u4ef6\u53bb\u6389\u7248\u672c\u4fe1\u606f\u00a0-->\n\t\t\t\t\t\t&lt;stripVersion>true&lt;\/stripVersion>\n\t\t\t\t\t&lt;\/configuration>\n\t\t\t\t&lt;\/execution>\n\t\t\t&lt;\/executions>\n\t\t&lt;\/plugin>\n\t&lt;\/plugins>\n&lt;\/build>\n<\/pre>\n\n\n\n<p><strong>\u7b2c\u516d\u7ae0 Maven \u53d8\u91cf\u4fe1\u606f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>6.1\u3001\u5185\u7f6e\u53d8\u91cf<\/strong><\/p>\n\n\n\n<p>\u4e3b\u8981\u6709\u4e24\u4e2a\u5e38\u7528\u5185\u7f6e\u5c5e\u6027\uff1a${basedir}\u9879\u76ee\u7684\u6839\u76ee\u5f55 (\u5305\u542b pom.xml \u6587\u4ef6\u7684\u76ee\u5f55)\uff0c${version}\u9879\u76ee\u7248\u672c<\/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=\"\">#\u7528\u6237\u53ef\u4ee5\u4f7f\u7528\u8be5\u5c5e\u6027\u5f15\u7528POM\u6587\u4ef6\u4e2d\u5bf9\u5e94\u5143\u7d20\u7684\u503c\uff0c\u5e38\u7528\u7684POM\u5c5e\u6027\u5305\u62ec\uff1a\n${project.build.sourceDirectory}\uff1a\u9879\u76ee\u7684\u4e3b\u6e90\u7801\u76ee\u5f55\uff0c\u9ed8\u8ba4\u4e3a\u00a0src\/main\/java\n${project.build.testSourceDirectory}\uff1a\u9879\u76ee\u7684\u6d4b\u8bd5\u6e90\u7801\u76ee\u5f55\uff0c\u9ed8\u8ba4\u4e3a\u00a0src\/test\/java\n${project.build.directory}\uff1a\u9879\u76ee\u6784\u4ef6\u8f93\u51fa\u76ee\u5f55\uff0c\u9ed8\u8ba4\u4e3a\u00a0target\/\n${project.outputDirectory}\uff1a\u9879\u76ee\u4e3b\u4ee3\u7801\u7f16\u8bd1\u8f93\u51fa\u76ee\u5f55\uff0c\u9ed8\u8ba4\u4e3a\u00a0target\/classes\/\n${project.testOutputDirectory}\uff1a\u9879\u76ee\u6d4b\u8bd5\u4ee3\u7801\u7f16\u8bd1\u8f93\u51fa\u76ee\u5f55\uff0c\u9ed8\u8ba4\u4e3a\u00a0target\/test-classes\/\n${project.groupId}\uff1a\u9879\u76ee\u7684\u00a0groupId\n${project.artifactId}\uff1a\u9879\u76ee\u7684\u00a0artifactId\n${project.version}\uff1a\u9879\u76ee\u7684\u00a0version\uff0c\u4e0e${version}\u7b49\u4ef7\n${project.build.fianlName}\uff1a\u9879\u76ee\u6253\u5305\u8f93\u51fa\u6587\u4ef6\u7684\u540d\u79f0\u3002\u9ed8\u8ba4\u4e3a${project.artifactId}-${project.version}\n\n#\u83b7\u53d6\u73af\u5883\u53d8\u91cf\u5c5e\u6027\uff0c\u6240\u6709\u73af\u5883\u53d8\u91cf\u90fd\u53ef\u4ee5\u4f7f\u7528\u4ee5env.\u5f00\u5934\u7684Maven\u5c5e\u6027\u5f15\u7528\n${env.xxx}\uff1a\u83b7\u53d6\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\uff1b\n\n#\u83b7\u53d6Settings\u5c5e\u6027\uff0c\u7528\u6237\u4f7f\u7528settings.\u5f00\u5934\u7684\u5c5e\u6027\u5f15\u7528\u00a0settings.xml\u00a0\u6587\u4ef6\u4e2dXML\u5143\u7d20\u7684\u503c\n${settings.xxx}\uff1a\u83b7\u53d6settings.xml\u4e2d\u5bf9\u5e94\u5143\u7d20\u7684\u503c\uff1b\u590d\u5236\u4ee3\u7801\n<\/pre>\n\n\n\n<p><strong>6.2\u3001\u81ea\u5b9a\u4e49\u53d8\u91cf<\/strong><\/p>\n\n\n\n<p>\u5982\u4f55\u5b9a\u4e49<\/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=\"\">&lt;project>\n\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0\u00a0\u00a0&lt;properties>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\u53d8\u91cf\u540d>\u53d8\u91cf\u503c&lt;\/\u53d8\u91cf\u540d>\n\u00a0\u00a0\u00a0\u00a0&lt;\/properties>\n\u00a0\u00a0\u00a0\u00a0...\n&lt;\/project><\/pre>\n\n\n\n<p>\u5982\u4f55\u5f15\u7528<\/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=\"\">${\u53d8\u91cf\u540d}<\/pre>\n\n\n\n<p>\u6848\u4f8b\u6f14\u793a<\/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=\"\">&lt;project>\n\u00a0\u00a0\u00a0\u00a0...\n\u00a0\u00a0\u00a0\u00a0&lt;properties>\n\t\t&lt;junit.version>3.8.1&lt;\/junit.version>\n\t&lt;\/properties>\n\n\t&lt;dependencies>\n\t\t&lt;dependency>\n\t\t\t&lt;groupId>junit&lt;\/groupId>\n\t\t\t&lt;artifactId>junit&lt;\/artifactId>\n\t\t\t&lt;version>${junit.version}&lt;\/version>\n\t\t\t&lt;scope>test&lt;\/scope>\n\t\t&lt;\/dependency>\n\t&lt;\/dependencies>\n\u00a0\u00a0\u00a0\u00a0...\n&lt;\/project>\n<\/pre>\n\n\n\n<p><strong>\u7b2c\u4e03\u7ae0 Maven \u6a21\u5757\u5316\u5f00\u53d1<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>7.1\u3001\u6982\u8ff0<\/strong><\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8981\u6a21\u5757\u5316\u5f00\u53d1\uff1f<\/p>\n\n\n\n<p>\u4e00\u4e2a\u5de5\u7a0b\u5f80\u5f80\u4f1a\u6709\u5f88\u591a\u4ee3\u7801\u6587\u4ef6\uff0c\u4e5f\u4f1a\u5206\u4e3a\u5f88\u591a\u5c42\uff0c\u6bd4\u5982\u4f20\u7edf\u7684 mvc\uff1acontroller\u3001service\u3001dao \u7b49\u7b49\u3002<\/p>\n\n\n\n<p>\u65f6\u95f4\u4e00\u573a\uff0c\u968f\u7740\u9879\u76ee\u5f00\u53d1\u7684\u8d8a\u6765\u8d8a\u5927\uff0c\u8fd9\u4e9b\u6587\u4ef6\u548c\u5c42\u6b21\u8d8a\u6765\u8d8a\u591a\uff0c\u653e\u5230\u4e00\u4e2a\u5de5\u7a0b\u4e2d\u4e5f\u8d8a\u6765\u8d8a\u96be\u7ba1\u7406\u3002<\/p>\n\n\n\n<p>\u800c\u4e14\uff0c\u6bd4\u5982 dao \u5c42\uff0c\u53ef\u80fd\u4e0d\u6b62\u8fd9\u4e00\u4e2a\u9879\u76ee\u7528\u5230\u4e86\uff0c\u5176\u4ed6\u9879\u76ee\u4e5f\u6709\u53ef\u80fd\u7528\u5230\uff0c\u4ee5\u524d\u7684\u6240\u6709\u4ee3\u7801\u653e\u5230\u4e00\u4e2a\u5de5\u7a0b\u4e2d\uff0c\u4f60\u5728\u62bd\u53d6\u7684\u65f6\u5019\u4f1a\u5f88\u9ebb\u70e6\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\u7ecf\u8fc7\u6a21\u5757\u5316\u5212\u5206\u4e4b\u540e\uff0c\u5404\u4e2a\u5c42\u6b21\u7ed3\u6784\u4e4b\u95f4\u53ef\u4ee5\u76f8\u4e92\u4f9d\u8d56\uff0c\u5927\u5927\u63d0\u9ad8\u4e86\u9879\u76ee\u7684\u5f00\u53d1\u8fdb\u5ea6\u3002<\/p>\n\n\n\n<p>\u5728\u672a\u6765\u7684\u5fae\u670d\u52a1\u67b6\u6784\u4e2d\uff0c\u8fd9\u4e00\u70b9\u4e5f\u6709\u5f88\u597d\u7684\u4f53\u73b0\u3002<\/p>\n\n\n\n<p>\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u6a21\u5757\u4e0e\u6a21\u5757\u4e4b\u95f4\u53ef\u4ee5\u76f8\u4e92\u4f9d\u8d56\uff0c\u7531\u7236\u5de5\u7a0b\u8fdb\u884c\u6240\u6709\u4f9d\u8d56\u7248\u672c\u7684\u7ba1\u7406\uff0c\u51cf\u5c11\u4e86\u5f00\u53d1\u4e2d\u5f88\u591a\u4e0d\u5fc5\u8981\u7684\u5de5\u4f5c\u3002<\/p>\n\n\n\n<p>\u6a21\u5757\u5316\u5f00\u53d1\u662f\u5728\u4f9d\u8d56\u7ee7\u627f\u7684\u57fa\u7840\u4e0a\u8fdb\u884c\u7684\uff0c\u6240\u4ee5\u4f60\u6709\u5fc5\u8981\u53bb\u4e86\u89e3\u4e00\u4e0b\u4f9d\u8d56\u7ee7\u627f\u3002<\/p>\n\n\n\n<p><strong>7.2\u3001Eclipse \u4e2d\u6f14\u793a<\/strong><\/p>\n\n\n\n<p><strong>7.2.1\u3001\u521b\u5efa\u7236\u9879\u76ee<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-1024x559.png\" alt=\"\" class=\"wp-image-8937\" width=\"544\" height=\"296\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-1024x559.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-300x164.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-768x419.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-1536x839.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-830x453.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-230x126.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-350x191.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15-480x262.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-15.png 1828w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-1024x549.png\" alt=\"\" class=\"wp-image-8938\" width=\"547\" height=\"293\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-1024x549.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-300x161.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-768x412.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-1536x824.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-830x445.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-230x123.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-350x188.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16-480x258.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-16.png 1864w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-1024x555.png\" alt=\"\" class=\"wp-image-8939\" width=\"552\" height=\"299\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-1024x555.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-300x163.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-768x416.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-1536x833.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-830x450.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-230x125.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-350x190.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17-480x260.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-17.png 1856w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-1024x554.png\" alt=\"\" class=\"wp-image-8940\" width=\"567\" height=\"306\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-1024x554.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-300x162.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-768x415.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-1536x830.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-830x449.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-230x124.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-350x189.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18-480x260.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-18.png 1846w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/figure><\/div>\n\n\n\n<p><strong>9.2.2\u3001\u521b\u5efa\u5b50\u9879\u76ee<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-1024x554.png\" alt=\"\" class=\"wp-image-8941\" width=\"569\" height=\"308\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-1024x554.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-300x162.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-768x415.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-1536x831.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-830x449.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-230x124.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-350x189.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19-480x260.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-19.png 1856w\" sizes=\"(max-width: 569px) 100vw, 569px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-1024x565.png\" alt=\"\" class=\"wp-image-8942\" width=\"580\" height=\"320\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-1024x565.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-300x166.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-768x424.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-1536x847.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-830x458.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-230x127.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-350x193.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20-480x265.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-20.png 1838w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-1024x554.png\" alt=\"\" class=\"wp-image-8943\" width=\"581\" height=\"314\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-1024x554.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-300x162.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-768x416.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-1536x832.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-830x449.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-230x125.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-350x190.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21-480x260.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-21.png 1858w\" sizes=\"(max-width: 581px) 100vw, 581px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-1024x559.png\" alt=\"\" class=\"wp-image-8944\" width=\"607\" height=\"331\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-1024x559.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-300x164.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-768x420.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-1536x839.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-830x453.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-230x126.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-350x191.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22-480x262.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-22.png 1856w\" sizes=\"(max-width: 607px) 100vw, 607px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-23-1024x552.png\" alt=\"\" class=\"wp-image-8945\" width=\"610\" height=\"327\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-23-300x162.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-23-230x124.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-23-350x189.png 350w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/figure><\/div>\n\n\n\n<p>\u7236\u5de5\u7a0b\u7684 pom.xml\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-1024x241.png\" alt=\"\" class=\"wp-image-8946\" width=\"574\" height=\"134\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-1024x241.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-300x71.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-768x181.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-1536x362.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-230x54.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-350x83.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24-480x113.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-24.png 1858w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><\/figure><\/div>\n\n\n\n<p>\u5b50\u5de5\u7a0b\u7684 pom.xml\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-1024x216.png\" alt=\"\" class=\"wp-image-8947\" width=\"587\" height=\"124\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-1024x216.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-300x63.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-768x162.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-1536x324.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-830x175.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-230x49.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-350x74.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25-480x101.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/12\/\u56fe\u7247-25.png 1894w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e00\u7ae0 Maven \u7b80\u4ecb 1.1\u3001Maven \u6982\u8ff0 Maven \u662f\u4e00\u4e2a\u8f6f\u4ef6\u9879\u76ee\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u5bf9 Java \u9879\u76ee [&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\/8921"}],"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=8921"}],"version-history":[{"count":6,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/8921\/revisions"}],"predecessor-version":[{"id":8949,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/8921\/revisions\/8949"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}