开发工具:IDEA
热部署配置过程:
1.Application.yml或者Application.properties 配置属性 spring.thymeleaf.cache=false;
2.在pom.xml增加spring-boot-devtools
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
3.修改idea设置 File-Settings-Compiler-Build Project automatically
4.ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running
到此热部署的配置就完成了。