一、导入依赖:(二者缺一不可)

SpringBoot + IntelliJ IDEA实现热部署

SpringBoot + IntelliJ IDEA实现热部署

二、配置application.properties:

SpringBoot + IntelliJ IDEA实现热部署

 三、设置idea:

     1.settings - Complier - Build project automatically(勾选)  SpringBoot + IntelliJ IDEA实现热部署

    2.CTRL+ALT+SHIFT+/ 组合键打开 Maintenance窗口选择Registry... ,找到compiler.automake.allow.when.app.running选项,         打勾开启运行时编译功能。

SpringBoot + IntelliJ IDEA实现热部署

SpringBoot + IntelliJ IDEA实现热部署

我的并没有compiler.automake.allow.when.app.running这一项,那就不用管,也可以配置成功,不知道为什么。

相关文章: