maven设置
<!-- hot swapping, disable cache for template, enable live reload -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
spring设置
然后在application.propeties
中添加spring.thymeleaf.cache = false
Intellij idea中的设置
File –> Setting –> Build, Execution, Deployment –> Compiler –>
check this Build project automatically
Press SHIFT+CTRL+A (Win/Lin) or Command+CTRL+A (Mac) to open a pop-up windows, type
registry
Find and check this option
compiler.automake.allow.when.app.running