1、pom文件配置依赖
<!-- 热部署 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2、配置文件(application.properties)开启热部署
#开启热部署
spring.devtools.restart.enabled=true
3、重启项目,使文件生效