1.导入包坐标
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2.pom.xml添加piugins插件并打开开关
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.2.RELEASE</version>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
3.设置idea自动编译
File ->Settings ->Build, Execution, DeploymentAdvanced Setttings -> Compiler

4.Advanced Setttings设置
File ->Settings ->Advanced Setttings

5.重启IDEA
本文介绍了如何在SpringBoot项目中配置Maven插件,启用devtools,以及在IntelliJIDEA中设置自动编译,以便于开发过程中的便捷管理和高效开发。
865

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



