最近在做一個查詢順豐物流的接口,需要用到豐橋官網提供的一些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> <!--豐橋結束-->
完畢