如spring 文档中所示,您可以尝试以下操作:
<bean id="veLocityEngine" class="org.springframework.ui.veLocity.VeLocityEnginefactorybean">
<property name="veLocityProperties">
<props>
<prop key="resource.loader">file</prop>
<prop key="file.resource.loader.class">
org.apache.veLocity.runtime.resource.loader.FileResourceLoader
</prop>
<prop key="file.resource.loader.path">${webapp.root}/WEB-INF/veLocity</prop>
<prop key="file.resource.loader.cache">false</prop>
</props>
</property>
</bean>
或者,您可以在中声明这些属性,veLocity.properties
并指定
<bean id="veLocityEngine" class="org.springframework.ui.veLocity.VeLocityEnginefactorybean">
<property name="configLocation" value="/WEB-INF/veLocity.properties"/>
</bean>