public class FreeMarkerConfigurationFactoryBean extends FreeMarkerConfigurationFactory implements org.springframework.beans.factory.FactoryBean<freemarker.template.Configuration>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
<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.
FreeMarkerConfigurationFactory.setConfigLocation(org.springframework.core.io.Resource),
FreeMarkerConfigurationFactory.setFreemarkerSettings(java.util.Properties),
FreeMarkerConfigurationFactory.setTemplateLoaderPath(java.lang.String),
org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurerlogger| Constructor and Description |
|---|
FreeMarkerConfigurationFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
freemarker.template.Configuration |
getObject() |
Class<? extends freemarker.template.Configuration> |
getObjectType() |
boolean |
isSingleton() |
createConfiguration, getAggregateTemplateLoader, getResourceLoader, getTemplateLoaderForPath, isPreferFileSystemAccess, newConfiguration, postProcessConfiguration, postProcessTemplateLoaders, setConfigLocation, setDefaultEncoding, setFreemarkerSettings, setFreemarkerVariables, setPostTemplateLoaders, setPreferFileSystemAccess, setPreTemplateLoaders, setResourceLoader, setTemplateLoaderPath, setTemplateLoaderPathspublic void afterPropertiesSet()
throws IOException,
freemarker.template.TemplateException
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanIOExceptionfreemarker.template.TemplateExceptionpublic freemarker.template.Configuration getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<freemarker.template.Configuration>public Class<? extends freemarker.template.Configuration> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<freemarker.template.Configuration>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<freemarker.template.Configuration>