在application.propertis中新增如下配置
spring.thymeleaf.cache=false # 关闭缓存
在pom.xml里引入调试工具,并设置为开启
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
alt + ctrl + S打开settings:
Build,Execution,Deployment —— Complier:
勾选Build project automatically
ctrl + shift + alt + /:
选择Registry
勾选compiler.automake.allow.when.app.running