码迷,mamicode.com
首页 > 其他好文 > 详细

freemarker配置信息

时间:2015-09-12 13:26:35      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

<!--  <!– freemarker的配置 –>

      <bean id="freemarkerConfigurer"

            class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">

          <property name="templateLoaderPath" value="/WEB-INF/view/" />

          <property name="defaultEncoding" value="GBK" />

          <property name="freemarkerSettings">

              <props>

                  <prop key="classic_compatible">true</prop>

 

                  <prop key="template_update_delay">10</prop>

                  <prop key="locale">zh_CN</prop>

                  <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>

                  <prop key="date_format">yyyy-MM-dd</prop>

                  <prop key="number_format">#.##</prop>

              </props>

          </property>

      </bean>

      <!– FreeMarker视图解析 如返回userinfo。。在这里配置后缀名ftl和视图解析器。。 –>

      <bean id="viewResolver"

            class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">

          <property name="viewClass"

                    value="org.springframework.web.servlet.view.freemarker.FreeMarkerView" />

          <property name="suffix" value=".ftl" />

          <property name="contentType" value="text/html;charset=GBK" />

          <property name="exposeRequestAttributes" value="true" />

          <property name="exposeSessionAttributes" value="true" />

          <property name="exposeSpringMacroHelpers" value="true" />

      </bean>

  -->

freemarker配置信息

标签:

原文地址:http://www.cnblogs.com/345214483-qq/p/4802837.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!