freemarker配置信息

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

      <bean id="freemarkerConfigurer"web

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

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

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

          <property name="freemarkerSettings">htm

              <props>servlet

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

 

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

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

                  <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>

  -->

相關文章
相關標籤/搜索