{"id":1147,"date":"2023-04-16T09:17:38","date_gmt":"2023-04-16T01:17:38","guid":{"rendered":"http:\/\/www.max-shu.com\/blog\/?p=1147"},"modified":"2023-04-16T09:17:39","modified_gmt":"2023-04-16T01:17:39","slug":"springboot%e6%8a%8a%e6%9c%ac%e5%9c%b0%e7%9a%84%e7%ac%ac%e4%b8%89%e6%96%b9jar%e6%96%87%e4%bb%b6%e6%89%93%e5%8c%85%e8%bf%9bjar%e5%8c%85","status":"publish","type":"post","link":"http:\/\/www.max-shu.com\/blog\/?p=1147","title":{"rendered":"SpringBoot\u628a\u672c\u5730\u7684\u7b2c\u4e09\u65b9jar\u6587\u4ef6\u6253\u5305\u8fdbjar\u5305"},"content":{"rendered":"\n<p><strong>\u628a\u7b2c\u4e09\u65b9jar\u6587\u4ef6\u6253\u5305\u8fdbjar\u5305\uff1a<\/strong><\/p>\n\n\n\n<p>\u5728maven&nbsp;center\u4ed3\u5e93\u6709\u7684jar\u5305\u548c\u5176\u4ed6\u4ed3\u5e93\u7684jar\u53ef\u76f4\u63a5&lt;dependence&gt;\u5bfc\u5165\uff0c\u4f46\u662f\u81ea\u5df1\u672c\u5730\u7684jar\u5982\u679c\u4e0d\u4e0a\u4f20\u4ed3\u5e93\uff0c\u5219\u9700\u8981\u5982\u4e0b\u65b9\u5f0f\u5bfc\u5165\uff1a<\/p>\n\n\n\n<p>\u4e00\u662f\u52a0\u5165dependency\uff0c\u4e8c\u662f\u52a0\u5165spring-boot-maven-plugin\uff1a<\/p>\n\n\n\n<p>\u3002\u3002\u3002<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;!&#8211; spring &#8211;&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;dependency&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/dependency&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;dependency&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;artifactId&gt;spring-boot-starter-data-jpa&lt;\/artifactId&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/dependency&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;dependency&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;artifactId&gt;spring-boot-configuration-processor&lt;\/artifactId&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/dependency&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;dependency&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;artifactId&gt;spring-boot-starter-test&lt;\/artifactId&gt;<\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 &lt;\/dependency>&lt;!&#8211; \u672c\u5730\u7684jar\u6587\u4ef6\uff0c\u8981\u5b9a\u4e49\u5728\u8fd9\uff0c\u6ce8\u610fscope\u4e3asystem\uff0csystemPath\u4e3a\u672c\u5730\u76ee\u5f55\u4e0b\u7684jar\u6587\u4ef6\uff0cgroupId\u548cartifactid\u968f\u4fbf\u5199 &#8211;><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 &lt;dependency><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;groupId>xxx_grp&lt;\/groupId><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;artifactId>xxx_id&lt;\/artifactId><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;version>1.0&lt;\/version><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;scope>system&lt;\/scope><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;systemPath>${pom.basedir}\/libs\/xxx-1.1.jar&lt;\/systemPath><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 &lt;\/dependency><\/p>\n\n\n\n<p>&lt;\/dependencies&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp;&lt;build&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;plugins&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;plugin&gt;<\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;groupId>org.springframework.boot&lt;\/groupId><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;artifactId>spring-boot-maven-plugin&lt;\/artifactId><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;configuration><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;!&#8211; \u5982\u679c\u6709parent\u7684pom.xml\uff0c\u5fc5\u987b\u5728\u6700\u9876\u5c42parent\u7684pom.xml\u91cc\u9762\u4e5f\u914d\u7f6e &#8211;><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;includeSystemScope>true&lt;\/includeSystemScope><\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/configuration><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/plugin&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/plugins&gt;<\/p>\n\n\n\n<p>&nbsp; &nbsp;&lt;\/build&gt;<\/p>\n\n\n\n<p>&lt;\/project><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u67e5\u770b\uff0c\u4f7f\u7528mvn&nbsp;package\u547d\u4ee4\u6253\u5305\u4e4b\u540e\uff0c\u5728target\u76ee\u5f55\u4e0b\uff1a<\/p>\n\n\n\n<p>XXXX-1.0.0.jar.original&nbsp; \uff1a\u4e0d\u542bBOOT-INF\u76ee\u5f55\u7684\u8f93\u51fa\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>XXXX-1.0.0.jar&nbsp; \uff1a\u542b\u6709BOOT-INF\u76ee\u5f55\uff0c\u91cc\u9762\u5305\u542b\u672c\u5730jar\u6587\u4ef6\uff0c\u4ece\u8fd9\u91cc\u9762\u5c31\u53ef\u4ee5\u770b\u5230\u672c\u5730\u7684\u7b2c\u4e09\u5305\u4e5f\u5728\uff08jar -tvf&nbsp;xxxx-1.0.0.jar\uff09\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SpringBoot\u628a\u672c\u5730\u7684\u7b2c\u4e09\u65b9jar\u6587\u4ef6\u6253\u5305\u8fdbjar\u5305<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[423,874,877,875,876],"class_list":["post-1147","post","type-post","status-publish","format-standard","hentry","category-63","tag-jar","tag-maven","tag-springboot","tag-875","tag-876"],"views":2009,"_links":{"self":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1147"}],"version-history":[{"count":1,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1147\/revisions"}],"predecessor-version":[{"id":1148,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1147\/revisions\/1148"}],"wp:attachment":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1147"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}