Reputation: 617
I have the following configuration which works. Now our clients want to customize these mail templates. Because we try to delivery an war file to several customers and dont want to override the changes they make in these templates. So I am thinking we may need to put the mailTemplate folder under Tomcat Root or somewhere else, just not inside the webapp.
I tried to change the value of templateLoaderPaths to something like this:
value="../mailTemplate"
,
but it did work.
Please help. Thanks.
<bean id="freeMarkerConfigurer"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPaths"
value="/WEB-INF/mailTemplate/" />
<property name="freemarkerSettings">
<props>
<prop key="template_update_delay">1800</prop>
<prop key="default_encoding">UTF-8</prop>
</props>
</property>
</bean>
Upvotes: 1
Views: 3112
Reputation: 2478
Specify the full file path to the template directory as a "file:" URL, like
<property name="templateLoaderPaths" value="file:///path/to/mailTemplate/" />
Upvotes: 2