Spring MVC with thimelean. Static data update

I am using Spring MVC with Thymeleaf and Tomcat, and I want to be able to update static data (html pages) without redeployment. In my application, html maps to a Spring controller. Even JRebel does not help. It updates Java classes perfectly, but does nothing with the view. What should I do to solve this problem? Maybe for html I need some kind of Jasper listener mechanism for JSP, or maybe I should disable cache for Spring controller? ..

+5
source share
1 answer

It really was a question of Timeleaf. I just had to disable caching for templateResolver, which is enabled by default.

<bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
    <property name="prefix" value="/" /> 
    <property name="suffix" value=".html" /> 
    <property name="templateMode" value="HTML5" /> 
    <property name="cacheable" value="false"/>
</bean>
+23

All Articles