在pom.xml文件中找到spring-boot-maven-plugin插件,添加如下配置
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>