1.在pom文件的中加入一行属性
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
<configuration>
<fork>true</fork>
<!-- 把includeSystemScope属性 设置为 true 再项目 打包时可以打到jar包中 -->
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
文章介绍了如何在Maven的pom.xml文件中配置SpringBoot插件(version2.1.1.RELEASE),通过设置`fork`和`includeSystemScope`属性,以便在项目打包时将系统范围内的依赖也打包进jar文件。
3320

被折叠的 条评论
为什么被折叠?



