1.
File->settings->compiler->将Build project automatically打勾
2.
按住ctrl+alt+shift+/,点击registry,找三个项
注意:第一个项在21版被移到了File->settings->Advanced Settings的Compiler中
第一项打勾,二三项设值100
compiler.automake.allow.when.app.running
compiler.document.save.trigger.delay
compiler.automake.trigger.delay
3.在pom中添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
4.配置热更新资源
点击Edit,将下面两项改为update classes and resources