1、IDEA配置
File—Settings—Compiler
2、Ctrl+Shift+Alt+?选择Registry…
3、选择compier.automake. allow.when.app.running
再次打开会变成蓝色
4、SpringBoot项目配置
在需要进行热部署的SpringBoot应用中添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
不用指定版本,会有默认的版本
5、配置SpringBoot的Maven插件
6、配置SpringBoot应用的变化更新策略
选择Update classes and resources 再点击Apply
如果电脑配置不高,不建议配置热部署