spring-framework / org.springframework.ui.freemarker / FreeMarkerConfigurationFactoryBean / <init>

<init>

FreeMarkerConfigurationFactoryBean()

Factory bean that creates a FreeMarker Configuration and provides it as bean reference. This bean is intended for any kind of usage of FreeMarker in application code, e.g. for generating email content. For web views, FreeMarkerConfigurer is used to set up a FreeMarkerConfigurationFactory. The simplest way to use this class is to specify just a "templateLoaderPath"; you do not need any further configuration then. For example, in a web application context:

 <bean id="freemarkerConfiguration" class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean"> <property name="templateLoaderPath" value="/WEB-INF/freemarker/"/> </bean>
See the base class FreeMarkerConfigurationFactory for configuration details.

Note: Spring's FreeMarker support requires FreeMarker 2.3 or higher.

Author
Darren Davison

Since
03.03.2004

See Also
#setConfigLocation#setFreemarkerSettings#setTemplateLoaderPathorg.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer