Intellij IDEA spring Boot 热部署

spring Boot 热部署

使用spring-boot-devtools配置实现springBoot热部署.

首先引入maven插件

1
2
3
4
5
6
<!-- spring boot热部署 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

修改Intellij设置1

选中File->setting->Build, Execution, Deployment->Compiler右侧Make project automatically选中保存
mp

修改Intellij设置2

快捷键Shift+Ctrl+Alt+/显示Maintenance,选择Registry->compiler.automake.allow.when.app.running打钩,然后重启项目就可以了
maintenance
compiler