springboot + idea 热部署
引用devtools依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
自定义配置热部署
以下配置用于自定义配置热部署,可以不设置。
spring:
devtools:
restart:
# 热部署开关,false即为关闭
enable: true
# 指定热部署的目录
#additional-paths: src/main/java
# 指定目录不更新
#exclude: test/**
Intellij Idea修改
1、勾上自动编译或者手动重新编译
File > Settings > Compiler-Build Project automatically
2、注册
ctrl + shift + alt + / > Registry > 勾选Compiler autoMake allow when app running