spring boot引入并打包外部jar包
1.引入jar包
在/src/main/resources下创建lib文件夹,加入引入的包
<dependency>
<groupId>com.jd</groupId>
<artifactId>sdk</artifactId>
<version>2.0</version>
<systemPath>${project.basedir}/src/main/resources/lib/sdk.jar</systemPath>
<scope>system</scope>
</dependency>
2. pom.xml 加上
<includeSystemScope>true</includeSystemScope>
即
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
<classifier>exec</classifier>
</configuration>
</plugin>
</plugins>
</build>