Spring Thymeleaf缓存设置为false不工作

Spring Thymeleaf缓存设置为false不工作,spring,spring-boot,thymeleaf,Spring,Spring Boot,Thymeleaf,我正在开发一个spring应用程序。 本项目的配置如下: spring开发工具依赖项是maven依赖项之一 thymeleaf依赖项是通过springbootstarter添加的,即org.springframework.boot:springbootstarterthymeleaf 我使用spring.thymeleaf.cache=false显式禁用了模板缓存 src/main/resources文件夹被标记为my IntelliJ IDEA项目中的资源 我正在使用IntelliJ ID

我正在开发一个spring应用程序。 本项目的配置如下:

  • spring开发工具依赖项是maven依赖项之一
  • thymeleaf依赖项是通过springbootstarter添加的,即
    org.springframework.boot:springbootstarterthymeleaf
  • 我使用
    spring.thymeleaf.cache=false显式禁用了模板缓存
  • src/main/resources
    文件夹被标记为my IntelliJ IDEA项目中的资源
我正在使用IntelliJ IDEA项目运行该应用程序。 运行应用程序时,我可以在控制台输出中看到:
LiveReload服务器正在端口35729上运行

尽管看起来我的所有配置都是正确的,但运行中的应用程序并没有加载我在运行时对模板所做的任何更改

只有当类路径上的一个文件被修改时,LiveReload服务器才会加载任何更改。
虽然我有资源,但在类路径上包含templates文件夹的文件夹中,对templates文件夹中html文件的更改不会反映在正在运行的应用程序中。
对我来说,有效的方法是向类路径添加
src/main/resources/templates
,即在IntelliJ中标记为resource

谢谢