Thymeleaf templates cache even when spring.template.cache: false
See original GitHub issueWhen editing Thymeleaf templates, a server restart is required to view the updates.
Even with the following setting in application.properties
:
# Allow Thymeleaf templates to be reloaded at dev time
spring.template.cache: false
To reproduce:
With spring-boot-sample-web-ui
, run it with mvn spring-boot:run
and edit any of the templates, they don’t reload after server has been started.
Issue Analytics
- State:
- Created 10 years ago
- Comments:28 (10 by maintainers)
Top Results From Across the Web
Thymeleaf cache and security in Spring Boot - Stack Overflow
Actually the spring.thymeleaf.cache property has nothing to do with security, but more with performance. If you disable the Thymeleaf cache, ...
Read more >83. Hot swapping - Spring
1 Thymeleaf templates. If you are using Thymeleaf, then set spring.thymeleaf.cache to false . See ThymeleafAutoConfiguration for ...
Read more >Fix Hot Reload of Thymeleaf-Templates In spring-boot:run | juplo
Some say, that you have to disable caching by setting spring.template.cache=false and spring.thymeleaf.cache=false and/or run the application in ...
Read more >Spring Boot and Thymeleaf: Reload templates and static ...
thymeleaf.cache to false disables template caching whereas spring.thymeleaf.prefix allows specifying prefix that gets prepended to view names ...
Read more >Spring: Disable caching of template and static files-Springboot
When it comes to spring-boot , by default the template options such as Thymeleaf and FreeMarker are configured to be cached. It is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It works!
I user IntelliJ Idea debug the application.
After add
application.properties
with:spring.thymeleaf.cache: false
Then,after edit html template, must use CTRL+F9 to make the project.
In this way,it works fine for me.
Springboot with IntelliJ and configurations in src/main/resources/application.properties I put in the following relative path, and started the Application.main(…) from IntelliJ: