@Bean(name="freeMarkerCfg")
public freemarker.template.Configuration freemarkerConfig() throws IOException {
freemarker.template.Configuration cfg = new freemarker.template.Configuration(freemarker.template.Configuration.VERSION_2_3_25);
cfg.setDirectoryForTemplateLoading(new File(templateFolder));
// cfg.setClassForTemplateLoading(this.getClass(), "templates");
cfg.setDefaultEncoding("UTF-8");
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
cfg.setLogTemplateExceptions(false);
return cfg;
}
ApplicationContext.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:springboot-jsp-generator
作者:
评论列表
文章目录