1、CTRL + SHIFT + A --> 查找make project automatically --> 选中
2、CTRL + SHIFT + A --> 查找Registry --> 找到并勾选compiler.automake.allow.when.app.running
3
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
4
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
5、Chrome禁用缓存
F12(或Ctrl+Shift+J或Ctrl+Shift+I)--> NetWork --> Disable Cache(while DevTools is open)
本文详细介绍了如何在IntelliJ IDEA中配置实时编译和热更新功能,包括启用项目自动编译、设置允许运行时编译、添加Spring Boot依赖、配置Maven插件以实现应用重启,以及在Chrome浏览器中禁用缓存,确保开发过程中的改动能够即时生效。
1443

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



