Springboot devtools的熱部署配置總共有三步html
一、jar 包引入java
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
二、插件配置 須要設置fork爲true屬性spring
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin>
三、若是使用了模板thymeleaf,需設置不緩存,沒有使用不須要配置緩存
spring.thymeleaf.cache=false
四、IntelliJ IDEA工具的設置,有兩個地方app
(1)File-Settings-Compiler-Build Project automaticallymaven
(2)ctrl + shift + alt + /,選擇Registry,勾上 Compiler autoMake allow when app runningspring-boot
親測可用,若有問題,請留言,謝謝工具