Hi. Is it possible to disable caching of velocity templates? Here are the configuration settings i've tried:
"springMacro" is the name of the resource loader for the bind macros. "file" is the name of the resource loader VelocityEngineFactory tells the velocity engine to use for templates in resourceLoaderPath if preferFileSystemAccess is true (which is is by default).Code:<bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> <property name="resourceLoaderPath" value="WEB-INF/views/" /> <property name="velocityProperties"> <props> <prop key="file.resource.loader.cache">false</prop> <prop key="springMacro.resource.loader.cache">false</prop> <prop key="velocimacro.library.autoreload">true</prop> ... </property> </bean>
VelocityToolboxViewResolver is a subclass of org.springframework.web.servlet.view.velocity.Velo cityViewResolver.Code:<bean id="viewResolver" class="no.bbs.nettbutikk.spring.VelocityToolboxViewResolver"> <property name="cache" value="false" /> <property name="exposeSpringMacroHelpers" value="true" /> <property name="suffix" value=".vm" /> <property name="contentType" value="text/html; charset=ISO-8859-1" /> <property name="toolboxConfigLocation" value="/WEB-INF/velocitytoolbox.xml" /> <property name="requestContextAttribute" value="rc" /> </bean>
Velocity 1.4, Spring 1.2 rc 1.


Reply With Quote