在pom文件中添加如下插件配置:
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <includeSystemScope>true</includeSystemScope> </configuration> </plugin>
<fork>true</fork> 用于明确表示编译版本配置有效,在spring-boot-maven-plugin中configuration下的includeSystemScope属性指定为true即可了。