Vih*_*tla 4 spring thymeleaf spring-boot
我有一个正在开发的 Spring 应用程序。项目配置如下:
org.springframework.boot:spring-boot-starter-thymeleafspring.thymeleaf.cache=falsesrc/main/resources文件夹在我的 IntelliJ IDEA 项目中被标记为资源。我正在使用 IntelliJ IDEA 项目来运行该应用程序。当我运行应用程序时,我可以在控制台输出中看到:LiveReload server is running on port 35729
虽然我的所有配置似乎都是正确的,但正在运行的应用程序并未加载我在运行时对模板所做的任何更改。
如果您正在使用Spring Tool Suite 4,则需要在您的中执行以下操作以application.properties禁用:cacheThymeleaf
spring.thymeleaf.cache=false
spring.thymeleaf.prefix=file:src/main/resources/templates/
Run Code Online (Sandbox Code Playgroud)
增加spring.thymeleaf.prefix价值对我有用。
有关该解决方案的更多信息:
https://github.com/spring-projects/spring-boot/issues/34#issuecomment-316295791
| 归档时间: |
|
| 查看次数: |
7203 次 |
| 最近记录: |