分享springboot怎么把本地jar也打进去的方法,亲测可用:

<!–引入本地jar包 alipay-sdk-java20170324180803.jar–>
<dependency>
<groupId>alipay</groupId>
<artifactId>sdk</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/alipay-sdk-java20170324180803.jar</systemPath>
</dependency>

build里面加

<!–配置打包包含本地包–>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>

 然后使用命令mvn clean package –DskipTests 打包即可