freemarker+spring中文乱码的解决,办法就是
1 .ftl文件中写好编码
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
2 配置中
<!-- freemarker页面解析器-->
<bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
<property name="suffix">
<value>.ftl</value>
</property>
<property name="contentType" value="text/html;charset=gb2312"></property>
</bean>
<!-- 配置Freemarker -->
<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath">
<value>/WEB-INF/ftl/</value>
</property>
</bean>