在POM文件里修改
<!-- build下配置 -->
<!-- 第三方jar包于maven打包的时候添加到lib中 -->
<resources>
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF/lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>
<!-- 将本地的jar包添加到maven仓库中 -->
<dependency>
<groupId>alipay-sdk-java20170307171631</groupId>
<artifactId>alipay-sdk-java20170307171631</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/***.jar</systemPath><!-- jar包地址 -->
</dependency>