因项目需求 不允许吧本身项目代码以外的各文件放到项目中。所以像模板,静态化之后的文件都要另外存放。
这是原先的配置文件
<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath" value="/web"/>
<property name="freemarkerVariables">
<map>
<entry key="appBase" value="/dgadmin/dgcms" />
<entry key="cms_perm" value-ref="cms_perm"/>
<entry key="text_cut" value-ref="text_cut"/>
<entry key="html_cut" value-ref="html_cut"/>
<entry key="cms_content_list" value-ref="cms_content_list"/>
<entry key="cms_content_page" value-ref="cms_content_page"/>
</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">/ftl/dgcms/index.ftl as p,/ftl/spring.ftl as s</prop>
</props>
</property>
</bean>
以上表示吧模板放到跟目路下的web文件夹下。 但是因为项目需求, 就要把模板放到项目以外的文件夹。 没有tomcat容器, 因为在linux中没有盘符 所以也不能有D,EC:/xxx/xxxx/xxxx这样的路径。 想了好久不知道这里该怎么配置,, 请大神帮忙,。在线等。。