List of usage examples for org.springframework.ui.freemarker FreeMarkerConfigurationFactoryBean setConfigLocation
public void setConfigLocation(Resource resource)
From source file:org.hdiv.web.servlet.view.freemarker.FreeMarkerConfigurerTests.java
public void testFreemarkerConfigurationFactoryBeanWithConfigLocation() throws TemplateException { FreeMarkerConfigurationFactoryBean fcfb = new FreeMarkerConfigurationFactoryBean(); fcfb.setConfigLocation(new FileSystemResource("myprops.properties")); Properties props = new Properties(); props.setProperty("myprop", "/mydir"); fcfb.setFreemarkerSettings(props);/* w w w . j av a2 s. c o m*/ try { fcfb.afterPropertiesSet(); fail("Should have thrown IOException"); } catch (IOException ex) { // expected } }