springMVC+velocity 框架中如何在vm模板中使用spring国际化标签,并且ResourceTool工具如何配置
/WEB-INF/views/
gbk
gbk
cn.mysteel.util.velocity.directive.Page
<bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
<property name="suffix">
<value>.vm</value>
</property>
<property name="contentType">
<value>text/html;charset=gbk</value>
</property>
<property name="exposeSessionAttributes">
<value>true</value>
</property>
<property name="toolboxConfigLocation" value="/WEB-INF/classes/toolbox.xml" />
<property name="viewClass" value="org.springframework.web.servlet.view.velocity.VelocityToolboxView" />
</bean>
在toolbox.xml里加入
<toolbox>
<tool>
<key>resourceTool</key>
<scope>application</scope>
<class>com.banksteel.util.velocity.ResourceTool(ps你的这个类的地址)</class>
</tool>