{"id":3177,"date":"2023-01-04T21:10:22","date_gmt":"2023-01-04T13:10:22","guid":{"rendered":"https:\/\/qaqaq.top\/?p=3177"},"modified":"2023-01-05T18:04:10","modified_gmt":"2023-01-05T10:04:10","slug":"maven%e6%a6%82%e8%bf%b0-why%ef%bc%9f%e4%b8%ba%e4%bb%80%e4%b9%88%e8%a6%81%e5%ad%a6maven%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/qaqaq.top\/?p=3177","title":{"rendered":"Maven\u6982\u8ff0 Why\uff1f\u4e3a\u4ec0\u4e48\u8981\u5b66Maven\uff1f"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1\u3001Maven \u4f5c\u4e3a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u2460jar \u5305\u7684\u89c4\u6a21<\/h3>\n\n\n\n<p>\u968f\u7740\u6211\u4eec\u4f7f\u7528\u8d8a\u6765\u8d8a\u591a\u7684\u6846\u67b6\uff0c\u6216\u8005\u6846\u67b6\u5c01\u88c5\u7a0b\u5ea6\u8d8a\u6765\u8d8a\u9ad8\uff0c\u9879\u76ee\u4e2d\u4f7f\u7528\u7684jar\u5305\u4e5f\u8d8a\u6765\u8d8a\u591a\u3002\u9879\u76ee\u4e2d\uff0c\u4e00\u4e2a\u6a21\u5757\u91cc\u9762\u7528\u5230\u4e0a\u767e\u4e2ajar\u5305\u662f\u975e\u5e38\u6b63\u5e38\u7684\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u4e0b\u9762\u7684\u4f8b\u5b50\uff0c\u6211\u4eec\u53ea\u7528\u5230 SpringBoot\u3001SpringCloud \u6846\u67b6\u4e2d\u7684\u4e09\u4e2a\u529f\u80fd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Nacos \u670d\u52a1\u6ce8\u518c\u53d1\u73b0<\/li>\n\n\n\n<li>Web \u6846\u67b6\u73af\u5883<\/li>\n\n\n\n<li>\u89c6\u56fe\u6a21\u677f\u6280\u672f Thymeleaf<\/li>\n<\/ul>\n\n\n\n<p>\u6700\u7ec8\u5374\u5bfc\u5165\u4e86 106 \u4e2a jar \u5305\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>org.springframework.security:spring-security-rsa:jar:1.0.9.RELEASE:compile com.netflix.ribbon: ribbon:jar:2.3.0:compile org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.3.6.RELEASE:compile commons-configuration:commons-configuration:jar:1.8:compile org.apache.logging.log4j:log4j-api:jar:2.13.3:compile org.springframework:spring-beans:jar:5.2.11.RELEASE:compile org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.2.6.RELEASE:compile org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.39:compile com.alibaba.cloud:spring-cloud-alibaba-commons:jar:2.2.6.RELEASE:compile org.bouncycastle:bcprov-jdk15on:jar:1.64:compile org.springframework.security:spring-security-crypto:jar:5.3.5.RELEASE:compile org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile com.google.j2objc:j2objc-annotations:jar:1.3:compile com.fasterxml.jackson.core:jackson-databind:jar:2.11.3:compile io.reactivex:rxjava:jar:1.3.8:compile ch.qos.logback:logback-classic:jar:1.2.3:compile org.springframework:spring-web:jar:5.2.11.RELEASE:compile io.reactivex:rxnetty-servo:jar:0.4.9:runtime org.springframework:spring-core:jar:5.2.11.RELEASE:compile io.github.openfeign.form:feign-form-spring:jar:3.8.0:compile io.github.openfeign.form:feign-form:jar:3.8.0:compile com.netflix.ribbon:ribbon-loadbalancer:jar:2.3.0:compile org.apache.httpcomponents:httpcore:jar:4.4.13:compile org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.4.RELEASE:compile org.slf4j:jul-to-slf4j:jar:1.7.30:compile top.qaqaq.demo:demo09-base-entity:jar:1.0-SNAPSHOT:compile org.yaml:snakeyaml:jar:1.26:compile org.springframework.boot:spring-boot-starter-logging:jar:2.3.6.RELEASE:compile io.reactivex:rxnetty-contexts:jar:0.4.9:runtime org.apache.httpcomponents:httpclient:jar:4.5.13:compile io.github.openfeign:feign-core:jar:10.10.1:compile org.springframework.boot:spring-boot-starter-aop:jar:2.3.6.RELEASE:compile org.hdrhistogram:HdrHistogram:jar:2.1.9:compile org.springframework:spring-context:jar:5.2.11.RELEASE:compile commons-lang:commons-lang:jar:2.6:compile io.prometheus:simpleclient:jar:0.5.0:compile ch.qos.logback:logback-core:jar:1.2.3:compile org.springframework:spring-webmvc:jar:5.2.11.RELEASE:compile com.sun.jersey:jersey-core:jar:1.19.1:runtime <a href=\"http:\/\/javax.ws.rs\">javax.ws.rs<\/a>:jsr311-api:jar:1.1.1:runtime javax.inject:javax.inject:jar:1:runtime org.springframework.cloud:spring-cloud-openfeign-core:jar:2.2.6.RELEASE:compile com.netflix.ribbon:ribbon-core:jar:2.3.0:compilecom.netflix.hystrix:hystrix-core:jar:1.5.18:compilecom.netflix.ribbon:ribbon-transport:jar:2.3.0:runtime org.springframework.boot:spring-boot-starter-json:jar:2.3.6.RELEASE:compile org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.2.6.RELEASE:compile com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.3:compile com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime io.github.openfeign:feign-hystrix:jar:10.10.1:compile io.github.openfeign:feign-slf4j:jar:10.10.1:compile com.alibaba.nacos:nacos-client:jar:1.4.2:compile org.apache.httpcomponents:httpcore-nio:jar:4.4.13:compile com.sun.jersey:jersey-client:jar:1.19.1:runtime org.springframework.cloud:spring-cloud-context:jar:2.2.6.RELEASE:compile org.glassfish:jakarta.el:jar:3.0.3:compile org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.3:compile org.springframework.cloud:spring-cloud-commons:jar:2.2.6.RELEASE:compile org.aspectj:aspectjweaver:jar:1.9.6:compile com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:jar:2.2.6.RELEASE:compile com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile com.alibaba.spring:spring-context-support:jar:1.0.10:compile jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile org.bouncycastle:bcpkix-jdk15on:jar:1.64:compile com.netflix.netflix-commons:netflix-commons-util:jar:0.3.0:runtime com.fasterxml.jackson.core:jackson-annotations:jar:2.11.3:compile com.google.guava:guava:jar:29.0-jre:compile com.google.guava:failureaccess:jar:1.0.1:compile org.springframework.boot:spring-boot:jar:2.3.6.RELEASE:compile com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.3:compile top.qaqaq.demo:demo08-base-api:jar:1.0-SNAPSHOT:compile org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.2.6.RELEASE:compile org.springframework.boot:spring-boot-autoconfigure:jar:2.3.6.RELEASE:compile org.slf4j:slf4j-api:jar:1.7.30:compile commons-io:commons-io:jar:2.7:compile org.springframework.cloud:spring-cloud-starter:jar:2.2.6.RELEASE:compile org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.39:compile io.reactivex:rxnetty:jar:0.4.9:runtime com.fasterxml.jackson.core:jackson-core:jar:2.11.3:compile com.google.code.findbugs:jsr305:jar:3.0.2:compile com.netflix.archaius:archaius-core:jar:0.7.6:compile org.springframework.boot:spring-boot-starter-web:jar:2.3.6.RELEASE:compile commons-codec:commons-codec:jar:1.14:compile com.netflix.servo:servo-core:jar:0.12.21:runtime com.google.errorprone:error_prone_annotations:jar:2.3.4:compile org.attoparser:attoparser:jar:2.0.5.RELEASE:compile top.qaqaq.demo:demo10-base-util:jar:1.0-SNAPSHOT:compile org.checkerframework:checker-qual:jar:2.11.1:compile org.thymeleaf:thymeleaf-spring5:jar:3.0.11.RELEASE:compile commons-fileupload:commons-fileupload:jar:1.4:compile com.netflix.ribbon:ribbon-httpclient:jar:2.3.0:compile com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime org.unbescape:unbescape:jar:1.1.6.RELEASE:compile org.springframework:spring-jcl:jar:5.2.11.RELEASE:compile com.alibaba.nacos:nacos-common:jar:1.4.2:compile commons-collections:commons-collections:jar:3.2.2:runtime javax.persistence:persistence-api:jar:1.0:compile com.alibaba.nacos:nacos-api:jar:1.4.2:compileorg.thymeleaf:thymeleaf:jar:3.0.11.RELEASE:compile org.springframework:spring-aop:jar:5.2.11.RELEASE:compile org.springframework.boot:spring-boot-starter:jar:2.3.6.RELEASE:compile org.springframework.boot:spring-boot-starter-tomcat:jar:2.3.6.RELEASE:compile org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.2.6.RELEASE:compile org.springframework:spring-expression:jar:5.2.11.RELEASE:compile org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.2.6.RELEASE:compile<\/p>\n<\/blockquote>\n\n\n\n<p>\u800c\u5982\u679c\u4f7f\u7528 Maven \u6765\u5f15\u5165\u8fd9\u4e9b jar \u5305\u53ea\u9700\u8981\u914d\u7f6e\u4e09\u4e2a\u300e\u4f9d\u8d56\u300f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    &lt;!-- Nacos \u670d\u52a1\u6ce8\u518c\u53d1\u73b0\u542f\u52a8\u5668 --&gt;\n    &lt;dependency&gt;\n        &lt;groupId&gt;com.alibaba.cloud&lt;\/groupId&gt;\n        &lt;artifactId&gt;spring-cloud-starter-alibaba-nacos-discovery&lt;\/artifactId&gt;\n    &lt;\/dependency&gt;\n\n    &lt;!-- web\u542f\u52a8\u5668\u4f9d\u8d56 --&gt;\n    &lt;dependency&gt;\n        &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n        &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n    &lt;\/dependency&gt;\n\n    &lt;!-- \u89c6\u56fe\u6a21\u677f\u6280\u672f thymeleaf --&gt;\n    &lt;dependency&gt;\n        &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n        &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;\/artifactId&gt;\n    &lt;\/dependency&gt;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u2461jar \u5305\u7684\u6765\u6e90<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8fd9\u4e2ajar\u5305\u6240\u5c5e\u6280\u672f\u7684\u5b98\u7f51\u3002\u5b98\u7f51\u901a\u5e38\u662f\u82f1\u6587\u754c\u9762\uff0c\u7f51\u7ad9\u7684\u7ed3\u6784\u53c8\u4e0d\u5c3d\u76f8\u540c\uff0c\u751a\u81f3\u627e\u5230\u4e0b\u8f7d\u94fe\u63a5\u8fd8\u53d1\u73b0\u9700\u8981\u901a\u8fc7\u7279\u6b8a\u7684\u5de5\u5177\u4e0b\u8f7d\u3002<\/li>\n\n\n\n<li>\u7b2c\u4e09\u65b9\u7f51\u7ad9\u63d0\u4f9b\u4e0b\u8f7d\u3002\u95ee\u9898\u662f\u4e0d\u89c4\u8303\uff0c\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4f1a\u51fa\u73b0\u5404\u79cd\u95ee\u9898\u3002\n<ul class=\"wp-block-list\">\n<li>jar\u5305\u7684\u540d\u79f0<\/li>\n\n\n\n<li>jar\u5305\u7684\u7248\u672c<\/li>\n\n\n\n<li>jar\u5305\u5185\u7684\u5177\u4f53\u7ec6\u8282<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u800c\u4f7f\u7528 Maven \u540e\uff0c\u4f9d\u8d56\u5bf9\u5e94\u7684 jar \u5305\u80fd\u591f\u81ea\u52a8\u4e0b\u8f7d\uff0c\u65b9\u4fbf\u3001\u5feb\u6377\u53c8\u89c4\u8303\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u2462jar \u5305\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb<\/h3>\n\n\n\n<p>\u6846\u67b6\u4e2d\u4f7f\u7528\u7684 jar \u5305\uff0c\u4e0d\u4ec5\u6570\u91cf\u5e9e\u5927\uff0c\u800c\u4e14\u5f7c\u6b64\u4e4b\u95f4\u5b58\u5728\u9519\u7efc\u590d\u6742\u7684\u4f9d\u8d56\u5173\u7cfb\u3002\u4f9d\u8d56\u5173\u7cfb\u7684\u590d\u6742\u7a0b\u5ea6\uff0c\u5df2\u7ecf\u4e0a\u5347\u5230\u4e86\u5b8c\u5168\u4e0d\u80fd\u9760\u4eba\u529b\u624b\u52a8\u89e3\u51b3\u7684\u7a0b\u5ea6\u3002\u53e6\u5916\uff0cjar \u5305\u4e4b\u95f4\u6709\u53ef\u80fd\u4ea7\u751f\u51b2\u7a81\u3002\u8fdb\u4e00\u6b65\u589e\u52a0\u4e86\u6211\u4eec\u5728 jar \u5305\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u7684\u96be\u5ea6\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u662f\u524d\u9762\u4f8b\u5b50\u4e2d jar \u5305\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/qaqaq.top\/wp-content\/uploads\/2023\/01\/image-9-748x1024.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"1024\" data-original=\"https:\/\/qaqaq.top\/wp-content\/uploads\/2023\/01\/image-9-748x1024.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-3178\"  sizes=\"(max-width: 748px) 100vw, 748px\" \/><\/div><\/figure>\n\n\n\n<p>\u800c\u5b9e\u9645\u4e0a jar \u5305\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb\u662f\u666e\u904d\u5b58\u5728\u7684\uff0c\u5982\u679c\u8981\u7531\u7a0b\u5e8f\u5458\u624b\u52a8\u68b3\u7406\u65e0\u7591\u4f1a\u589e\u52a0\u6781\u9ad8\u7684\u5b66\u4e60\u6210\u672c\uff0c\u800c\u8fd9\u4e9b\u5de5\u4f5c\u53c8\u5bf9\u5b9e\u73b0\u4e1a\u52a1\u529f\u80fd\u6beb\u65e0\u5e2e\u52a9\u3002<\/p>\n\n\n\n<p>\u800c\u4f7f\u7528 Maven \u5219\u51e0\u4e4e\u4e0d\u9700\u8981\u7ba1\u7406\u8fd9\u4e9b\u5173\u7cfb\uff0c\u6781\u4e2a\u522b\u7684\u5730\u65b9\u8c03\u6574\u4e00\u4e0b\u5373\u53ef\uff0c\u6781\u5927\u7684\u51cf\u8f7b\u4e86\u6211\u4eec\u7684\u5de5\u4f5c\u91cf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2\u3001Maven \u4f5c\u4e3a\u6784\u5efa\u7ba1\u7406\u5de5\u5177<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u2460\u4f60\u6ca1\u6709\u6ce8\u610f\u8fc7\u7684\u6784\u5efa<\/h3>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u4e0d\u4f7f\u7528 Maven\uff0c\u4f46\u662f\u6784\u5efa\u5fc5\u987b\u8981\u505a\u3002\u5f53\u6211\u4eec\u4f7f\u7528 IDEA \u8fdb\u884c\u5f00\u53d1\u65f6\uff0c\u6784\u5efa\u662f IDEA \u66ff\u6211\u4eec\u505a\u7684\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2461\u8131\u79bb IDE \u73af\u5883\u4ecd\u9700\u6784\u5efa<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/qaqaq.top\/wp-content\/uploads\/2023\/01\/image-10.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"466\" data-original=\"https:\/\/qaqaq.top\/wp-content\/uploads\/2023\/01\/image-10.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-3179\"  sizes=\"(max-width: 911px) 100vw, 911px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3\u3001\u7ed3\u8bba<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7ba1\u7406\u89c4\u6a21\u5e9e\u5927\u7684 jar \u5305\uff0c\u9700\u8981\u4e13\u95e8\u5de5\u5177\u3002<\/li>\n\n\n\n<li>\u8131\u79bb IDE \u73af\u5883\u6267\u884c\u6784\u5efa\u64cd\u4f5c\uff0c\u9700\u8981\u4e13\u95e8\u5de5\u5177\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001Maven \u4f5c\u4e3a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177 \u2460jar \u5305\u7684\u89c4\u6a21 \u968f\u7740\u6211\u4eec\u4f7f\u7528\u8d8a\u6765\u8d8a\u591a\u7684\u6846\u67b6\uff0c\u6216\u8005\u6846\u67b6\u5c01\u88c5\u7a0b\u5ea6\u8d8a\u6765\u8d8a\u9ad8\uff0c\u9879 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[122],"tags":[130],"class_list":["post-3177","post","type-post","status-publish","format-standard","hentry","category-maven-code","tag-maven"],"_links":{"self":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts\/3177"}],"collection":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3177"}],"version-history":[{"count":2,"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts\/3177\/revisions"}],"predecessor-version":[{"id":3242,"href":"https:\/\/qaqaq.top\/index.php?rest_route=\/wp\/v2\/posts\/3177\/revisions\/3242"}],"wp:attachment":[{"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qaqaq.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}