在pom.xml
第一步
//应用外置jar包
<dependency>
<groupId>jeewx</groupId>随便写
<artifactId>jeewx</artifactId>随便写
<version>1.0</version> 随便写
<scope>system</scope> 这个值为system
<systemPath>${
basedir}/lib/jeewx-1.0.jar</systemPath> 引入第三方的jar包
</dependency>
第二步
这样写maven的打包插件
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--指定main入口,否则如果有其他main方法存在时打包异常-->
<mainClass>com.jing.JingApplication</mainClass>
<executable>true</executable>
<includeSystemScope>true</includeSystemScope> 主要是这个
</configuration>
</plugin>
以上配置了之后,在将项目打包为jar包的时候,第三方jar包就打包到我们项目中的jar包