Spring MVC with Thymeleaf. Update static data

前端 未结 1 991
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 08:15

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 controlle

相关标签:
1条回答
  • 2020-12-18 08:56

    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>
    
    0 讨论(0)
提交回复
热议问题