1、添加依赖
dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>
2、File->Settings开启自动编译

IDEA热部署_spring

3.编辑器右上角 Edit Configuration进行设置即可

IDEA热部署_spring_02

IDEA热部署_intellij-idea_03