编辑
2022-01-10
undefined
00
请注意,本文编写于 980 天前,最后修改于 28 天前,其中某些信息可能已经过时。

目录

步骤一

pom.xml 中在加入依赖

xml
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <scope>true</scope> </dependency>

然后再<build>下添加如下依赖。

xml
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins> </build>

步骤二

(1)打开设置勾选自动构建项目

image-20220506130419248

(2)高级设置中勾选自动 make,老版 IDEA 需要ctrl + shift + alt + /,选择注册表,勾上 Compiler autoMake allow when app running,但新版中移到高级设置中。

image-20220506130533312

接着启动项目,修改文件即可自动热加载,无需手动重新运行。

本文作者:任浪漫

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-ND 4.0 许可协议。转载请注明出处!