idea热加载和thymeleaf禁用缓存

idea热加载

第一步:添加依赖

spring-boot项目中引入如下依赖

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
</dependency>

第二步:勾选Build Project automatically

 第三步:勾选compiler.automake.allow.when.app.running

 ctrl + shift + alt+/ 命令:registry -> 勾选

 

 

thymeleaf禁用缓存

假如在不想使用idea热加载的情况下,又要禁用thymeleaf缓存。只需要在第二步和第三步都配置好的情况下,增加下面的配置即可

spring.thymeleaf.cache=false 
原文地址:https://www.cnblogs.com/moris5013/p/11976063.html