之前因为某个jar并不存在于Maven库,于是通过如下方式进行引入
<dependency>
<groupId>com.alipay.api</groupId>
<artifactId>sdk</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/alipay-sdk-java-3.3.0.jar</systemPath>
</dependency>
但是在SpringBoot中打包时,本地jar并没有打入,需要在插件添加如下配置:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.5.RELEASE</version>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>