基於Maven的SpringBoot項目添加第三方依賴


最近在做一個查詢順豐物流的接口,需要用到豐橋官網提供的一些jar,這些jar在maven倉庫沒有。所以需要下載下來再進行配置。

第一步:再resource目錄下新鍵一個lib文件夾,存放下載好的jar。

 

 

第二補,在pom.xml中對這些jar進行坐標依賴。

 <!--豐橋api依賴-->
        <dependency>
            <groupId>slf4j</groupId><!--可隨意-->
            <artifactId>slf4j</artifactId><!--可隨意-->
            <version>1.0</version><!--對應jar相應版本(不知道可隨意)-->
            <scope>system</scope>
            <systemPath>${pom.basedir}/src/main/resources/lib/slf4j-api-1.7.7.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId><!--可隨意-->
            <artifactId>commons-codec</artifactId><!--可隨意-->
            <version>1.0</version><!--對應jar相應版本(不知道可隨意)-->
            <scope>system</scope>
            <systemPath>${pom.basedir}/src/main/resources/lib/commons-codec-1.9.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId><!--可隨意-->
            <artifactId>commons-logging</artifactId><!--可隨意-->
            <version>1.0</version><!--對應jar相應版本(不知道可隨意)-->
            <scope>system</scope>
            <systemPath>${pom.basedir}/src/main/resources/lib/commons-logging-1.2.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>httpclient</groupId><!--可隨意-->
            <artifactId>httpclient</artifactId><!--可隨意-->
            <version>1.0</version><!--對應jar相應版本(不知道可隨意)-->
            <scope>system</scope>
            <systemPath>${pom.basedir}/src/main/resources/lib/httpclient-4.3.4.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>httpcore</groupId><!--可隨意-->
            <artifactId>httpcore</artifactId><!--可隨意-->
            <version>1.0</version><!--對應jar相應版本(不知道可隨意)-->
            <scope>system</scope>
            <systemPath>${pom.basedir}/src/main/resources/lib/httpcore-4.3.2.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>SF-CSIM-EXPRESS</groupId><!--可隨意-->
            <artifactId>SF-CSIM-EXPRESS</artifactId><!--可隨意-->
            <version>1.0</version><!--對應jar相應版本(不知道可隨意)-->
            <scope>system</scope>
            <systemPath>${pom.basedir}/src/main/resources/lib/SF-CSIM-EXPRESS-SDK-V1.6.jar</systemPath>
        </dependency>

        <!--豐橋結束-->

 

完畢


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM