描述:idea maven项目,需要对接第三方接口,第三方提供的jar包,使用maven方式导入依赖。
第一步,在项目所在模块创建lib目录,如图
第二步,然后将所需要的jar包放到此目录下面
第三步,打开模块的pom文件,添加如图
<!--添加的本地的外部jar包依赖-->
<dependency>
<!--groupId、artifactId、version为自定义,groupId与artifactId但是不能重名-->
<groupId>openapi</groupId>
<artifactId>sdk</artifactId>
<version>6.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/openapi-sdk-6.0.jar</systemPath>
</dependency>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>