- 在pom中引入依赖spring-boot-devtools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
- 清除缓存
spring.thymeleaf.cache=false
3.开启自动Build
在eclipse中
Project-->选中Build Automatically