Search in sources :

Example 1 with SpringTemplateLoader

use of org.springframework.ui.freemarker.SpringTemplateLoader in project spring-framework by spring-projects.

the class FreeMarkerConfigurerTests method freeMarkerConfigurationFactoryBeanWithResourceLoaderPath.

@Test
public void freeMarkerConfigurationFactoryBeanWithResourceLoaderPath() throws Exception {
    FreeMarkerConfigurationFactoryBean fcfb = new FreeMarkerConfigurationFactoryBean();
    fcfb.setTemplateLoaderPath("file:/mydir");
    fcfb.afterPropertiesSet();
    Configuration cfg = fcfb.getObject();
    assertTrue(cfg.getTemplateLoader() instanceof SpringTemplateLoader);
}
Also used : FreeMarkerConfigurationFactoryBean(org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean) Configuration(freemarker.template.Configuration) SpringTemplateLoader(org.springframework.ui.freemarker.SpringTemplateLoader) Test(org.junit.Test)

Aggregations

Configuration (freemarker.template.Configuration)1 Test (org.junit.Test)1 FreeMarkerConfigurationFactoryBean (org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean)1 SpringTemplateLoader (org.springframework.ui.freemarker.SpringTemplateLoader)1