1、ctrl+Shift+Alt+/,选择Registry
如果没有找到,则说明你的idea是2021版本以上,则按照下面的方式设置
2021版IDEA没有compiler.automake.allow.when.app.running
3、Setting—>Compiler—>勾选Build project automatically
到此,SpringMVC框架的热部署已经设置完成l,
下面是Spring Boot 的添加依赖jar
4、pom.xml增加依赖(这种方式值适用于springboot项目)
<!-- 热部署模块 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 这个需要为 true 热部署才有效 -->
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>