在开发中,Spring Boot不能热更新,每次都要手动重启比较麻烦。配置其实比较简单。通过以下几步就可以完成
- 添加dev依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
- Idea打开自动编译
- CMD+Shift+A,打开Register,如果发现不能打开的情况,可能是快捷键与其它软件冲突,在我这里是与钉钉冲突了,可以修改钉钉快捷键或者暂时关闭钉钉。
- 搜索Automake 选中就可以了