java - how to config Freemarker with SpringTemplateLoader instead of FiletemPlateLoader -


im newbie spring.
problem send email in spring freemaker config. old system can send email because use springtemplateloader when load template when send mail. new system uses filetemplateloader (i debuged found out that) can not find wright template email sending mail. want ask how config freemarker use springtemplateloader. please help. thank you.

i found out answer.
when use freemarker spring framework, freemaker have config object org.springframework.ui.freemarker.freemarkerconfigurationfactorybean , spring has lib spring-context-support.jar support this.
read code of list find property preferfilesystemaccess, default value true, set false use springtemplateloader.
let me example in config:
<bean id="mailsender" class="com.aklero.idea.email.mailsender" init-method="initallemailsystems"/> <bean id="mailtemplatebuilder" class="com.aklero.idea.email.mailtemplatebuilder" />
<bean id="freemarkerconfig" class="org.springframework.ui.freemarker.freemarkerconfigurationfactorybean">
<property name="templateloaderpath" value="classpath:com/aklero/idea/email/templates"/>
<property name="preferfilesystemaccess" value="false"/>


Comments