{"id":2495,"date":"2024-11-03T06:13:09","date_gmt":"2024-11-02T22:13:09","guid":{"rendered":"https:\/\/www.dingdongai.com\/?p=2495"},"modified":"2024-11-03T06:13:09","modified_gmt":"2024-11-02T22:13:09","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e9%a1%b9%e7%9b%ae%e4%b8%ad%e6%b7%bb%e5%8a%a0%e3%80%81%e6%9b%b4%e6%96%b0%e5%92%8c%e5%88%a0%e9%99%a4%e4%be%9d%e8%b5%96%e5%ba%93","status":"publish","type":"post","link":"https:\/\/www.dingdongai.com\/?p=2495","title":{"rendered":"\u5982\u4f55\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0\u3001\u66f4\u65b0\u548c\u5220\u9664\u4f9d\u8d56\u5e93"},"content":{"rendered":"<h2>\u667a\u80fd\u52a9\u624b\u7f16\u7a0b\u5e2e\u52a9\u4e0e\u4ee3\u7801\u8c03\u8bd5<\/h2>\n<p>\u5728\u8f6f\u4ef6\u5de5\u7a0b\u4e2d\uff0c\u4f9d\u8d56\u7ba1\u7406\u4e0e\u6784\u5efa\u5de5\u5177\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u7ba1\u7406\u9879\u76ee\u4e2d\u7684\u4f9d\u8d56\u5e93\uff0c\u5e76\u8fdb\u884c\u6784\u5efa\u3001\u7f16\u8bd1\u7b49\u5de5\u4f5c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0\u3001\u66f4\u65b0\u548c\u5220\u9664\u4f9d\u8d56\u5e93\u3002<\/p>\n<h3>\u6dfb\u52a0\u4f9d\u8d56\u5e93<\/h3>\n<p>\u8981\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0\u4f9d\u8d56\u5e93\uff0c\u9996\u5148\u9700\u8981\u5728\u9879\u76ee\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u6307\u5b9a\u4f9d\u8d56\u5e93\u7684\u540d\u79f0\u548c\u7248\u672c\u3002\u5e38\u7528\u7684\u914d\u7f6e\u6587\u4ef6\u5305\u62ec<code>pom.xml<\/code>\uff08\u7528\u4e8eMaven\u9879\u76ee\uff09\u3001<code>build.gradle<\/code>\uff08\u7528\u4e8eGradle\u9879\u76ee\uff09\u7b49\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5728Maven\u9879\u76ee\u4e2d\uff0c\u53ef\u4ee5\u5728<code>pom.xml<\/code>\u6587\u4ef6\u7684<code>&lt;dependencies&gt;<\/code>\u6807\u7b7e\u5185\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p><code>xml<br \/>\n&lt;dependency&gt;<br \/>\n    &lt;groupId&gt;com.example&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;example-library&lt;\/artifactId&gt;<br \/>\n    &lt;version&gt;1.0.0&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n<\/code><\/p>\n<p>\u6dfb\u52a0\u5b8c\u4f9d\u8d56\u5e93\u7684\u914d\u7f6e\u540e\uff0c\u4fdd\u5b58\u6587\u4ef6\u5e76\u91cd\u65b0\u6784\u5efa\u9879\u76ee\uff0c\u4f9d\u8d56\u5e93\u5c31\u4f1a\u88ab\u81ea\u52a8\u4e0b\u8f7d\u5e76\u6dfb\u52a0\u5230\u9879\u76ee\u4e2d\u3002<\/p>\n<h3>\u66f4\u65b0\u4f9d\u8d56\u5e93<\/h3>\n<p>\u5f53\u4f9d\u8d56\u5e93\u7684\u65b0\u7248\u672c\u53d1\u5e03\u65f6\uff0c\u6211\u4eec\u901a\u5e38\u5e0c\u671b\u80fd\u591f\u53ca\u65f6\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u4e3a\u4e86\u66f4\u65b0\u4f9d\u8d56\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\u9879\u76ee\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u7248\u672c\u53f7\u6765\u5b9e\u73b0\u3002<\/p>\n<p>\u4ee5Gradle\u9879\u76ee\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u5728<code>build.gradle<\/code>\u6587\u4ef6\u4e2d\u627e\u5230\u4f9d\u8d56\u5e93\u7684\u914d\u7f6e\uff0c\u5c06\u7248\u672c\u53f7\u4fee\u6539\u4e3a\u6700\u65b0\u7248\u672c\u5373\u53ef\u3002<\/p>\n<p><code>gradle<br \/>\ndependencies {<br \/>\n    implementation 'com.example:example-library:2.0.0'<br \/>\n}<br \/>\n<\/code><\/p>\n<p>\u4fdd\u5b58\u6587\u4ef6\u540e\uff0c\u91cd\u65b0\u6784\u5efa\u9879\u76ee\u5373\u53ef\u66f4\u65b0\u4f9d\u8d56\u5e93\u3002<\/p>\n<h3>\u5220\u9664\u4f9d\u8d56\u5e93<\/h3>\n<p>\u5982\u679c\u9879\u76ee\u4e2d\u67d0\u4e2a\u4f9d\u8d56\u5e93\u4e0d\u518d\u9700\u8981\uff0c\u53ef\u4ee5\u901a\u8fc7\u5220\u9664\u9879\u76ee\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u76f8\u5e94\u4f9d\u8d56\u5e93\u914d\u7f6e\u6765\u5b9e\u73b0\u3002<\/p>\n<p>\u4ee5Maven\u9879\u76ee\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u5728<code>pom.xml<\/code>\u6587\u4ef6\u7684<code>&lt;dependencies&gt;<\/code>\u6807\u7b7e\u5185\u627e\u5230\u8981\u5220\u9664\u7684\u4f9d\u8d56\u5e93\u914d\u7f6e\uff0c\u5c06\u5176\u5220\u9664\u5373\u53ef\u3002<\/p>\n<p><code>xml<br \/>\n&lt;dependencies&gt;<br \/>\n    &lt;dependency&gt;<br \/>\n        &lt;groupId&gt;com.example&lt;\/groupId&gt;<br \/>\n        &lt;artifactId&gt;example-library&lt;\/artifactId&gt;<br \/>\n        &lt;version&gt;1.0.0&lt;\/version&gt;<br \/>\n    &lt;\/dependency&gt;<br \/>\n    &lt;!-- \u8981\u5220\u9664\u7684\u4f9d\u8d56\u5e93\u914d\u7f6e --&gt;<br \/>\n&lt;\/dependencies&gt;<br \/>\n<\/code><\/p>\n<p>\u5220\u9664\u5b8c\u914d\u7f6e\u540e\uff0c\u4fdd\u5b58\u6587\u4ef6\u5e76\u91cd\u65b0\u6784\u5efa\u9879\u76ee\uff0c\u4f9d\u8d56\u5e93\u5c31\u4f1a\u88ab\u79fb\u9664\u3002<\/p>\n<p>\u5728\u9879\u76ee\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u5408\u7406\u7ba1\u7406\u4f9d\u8d56\u5e93\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u65b9\u4fbf\u5730\u6dfb\u52a0\u3001\u66f4\u65b0\u548c\u5220\u9664\u9879\u76ee\u4e2d\u7684\u4f9d\u8d56\u5e93\uff0c\u4ece\u800c\u63d0\u9ad8\u9879\u76ee\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u6269\u5c55\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u667a\u80fd\u52a9\u624b\u7f16\u7a0b\u5e2e\u52a9\u4e0e\u4ee3\u7801\u8c03\u8bd5 \u5728\u8f6f\u4ef6\u5de5\u7a0b\u4e2d\uff0c\u4f9d\u8d56\u7ba1\u7406\u4e0e\u6784\u5efa\u5de5\u5177\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u7ba1\u7406\u9879\u76ee\u4e2d\u7684\u4f9d\u8d56\u5e93 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.dingdongai.com\/?p=2495\"> <span class=\"screen-reader-text\">\u5982\u4f55\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0\u3001\u66f4\u65b0\u548c\u5220\u9664\u4f9d\u8d56\u5e93<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","footnotes":""},"categories":[1],"tags":[57,3390,41,383,3391,1098],"class_list":["post-2495","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-57","tag-3390","tag-41","tag-383","tag-3391","tag-1098"],"_links":{"self":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/posts\/2495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2495"}],"version-history":[{"count":0,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/posts\/2495\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}