1.首先配置pom.xml文件,将下面依赖添加到<dependencies>下面
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
具体如下图所示
2.在File->Settings->Compiler.
3.勾选Build project automatically.
4.点击Apply(务必点击Apply)
5.打开启动文件,在绿色三角形处点击鼠标右键,选择 Modify Run Configuration…
6、点击 Modify options
7、将下述两个选项均配置为 Update classes and resources
这样idea2024的热部署就完成了。