springmvc+freemarker中,不加载自定义模板,值加载了spring.ftl
这是我的配置文件:<beanid="freemarkerConfig"class="org.springframework.web.servlet.view.freema...
这是我的配置文件: <bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<!-- 模板路径 -->
<property name="templateLoaderPath" value="/WEB-INF/ftl/"/>
<!-- 暂时屏蔽自定义标签 -->
<property name="freemarkerVariables">
<map>
<entry key="cmsBannerList" value-ref="cmsBannerList"/>
</map>
</property>
<property name="freemarkerSettings">
<props>
<prop key="template_update_delay">0</prop>
<prop key="defaultEncoding">UTF-8</prop>
<prop key="url_escaping_charset">UTF-8</prop>
<prop key="locale">zh_CN</prop>
<prop key="boolean_format">true,false</prop>
<prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>
<prop key="date_format">yyyy-MM-dd</prop>
<prop key="time_format">HH:mm:ss</prop>
<prop key="number_format">0.######</prop>
<prop key="whitespace_stripping">true</prop>
<prop key="auto_import">/jxy/test.ftl as p,spring.ftl as s</prop>
</props>
</property>
</bean> 展开
<!-- 模板路径 -->
<property name="templateLoaderPath" value="/WEB-INF/ftl/"/>
<!-- 暂时屏蔽自定义标签 -->
<property name="freemarkerVariables">
<map>
<entry key="cmsBannerList" value-ref="cmsBannerList"/>
</map>
</property>
<property name="freemarkerSettings">
<props>
<prop key="template_update_delay">0</prop>
<prop key="defaultEncoding">UTF-8</prop>
<prop key="url_escaping_charset">UTF-8</prop>
<prop key="locale">zh_CN</prop>
<prop key="boolean_format">true,false</prop>
<prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>
<prop key="date_format">yyyy-MM-dd</prop>
<prop key="time_format">HH:mm:ss</prop>
<prop key="number_format">0.######</prop>
<prop key="whitespace_stripping">true</prop>
<prop key="auto_import">/jxy/test.ftl as p,spring.ftl as s</prop>
</props>
</property>
</bean> 展开
若以下回答无法解决问题,邀请你更新回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询