List of usage examples for org.springframework.web.servlet.view.freemarker FreeMarkerConfigurer setPreferFileSystemAccess
public void setPreferFileSystemAccess(boolean preferFileSystemAccess)
From source file:org.springframework.cloud.netflix.hystrix.dashboard.HystrixDashboardConfiguration.java
/** * Overrides Spring Boot's {@link FreeMarkerAutoConfiguration} to prefer using a * {@link SpringTemplateLoader} instead of the file system. This corrects an issue * where Spring Boot may use an empty 'templates' file resource to resolve templates * instead of the packaged Hystrix classpath templates. * @return FreeMarker configuration// w w w. j a v a2s .c o m */ @Bean public FreeMarkerConfigurer freeMarkerConfigurer() { FreeMarkerConfigurer configurer = new FreeMarkerConfigurer(); configurer.setTemplateLoaderPaths(DEFAULT_TEMPLATE_LOADER_PATH); configurer.setDefaultEncoding(DEFAULT_CHARSET); configurer.setPreferFileSystemAccess(false); return configurer; }