5

I'm using Spring MVC with Thymeleaf and Tomcat and I want to be able update static data (html pages) without redeploy. In my application html is mapping by Spring controller. Even JRebel doesn't helps. It updates java classes great, but does nothing with view. What should I do to solve this issue? Maybe for html I need some listener mechanism like Jasper for JSP, or maybe I should disable some cache for Spring controller?..

Maxim Kolesnikov
  • 4,845
  • 5
  • 35
  • 64

1 Answers1

23

This actually was Thymeleaf issue. I just had to disable caching for templateResolver, which is ON 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>
Maxim Kolesnikov
  • 4,845
  • 5
  • 35
  • 64