1 在項目下新建lib文件夾,將需要引入的jar包放進去
image
2 在pom.xml中添加引入
<dependency>
<groupId>com.abcpay</groupId>
<artifactId>TrustPayCBPClient</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/TrustPayCBPClient-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.abcpay</groupId>
<artifactId>TrustPayClient</artifactId>
<version>3.1.7</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/TrustPayClient-3.1.7.jar</systemPath>
</dependency>
3 修改pom.xml中的打包配置舱卡,保證打包時將外部引入的jar打包
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.2.RELEASE</version>
<configuration>
<executable>true</executable>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>