本文整理了Java中freemarker.template.Configuration.setAutoFlush()
方法的一些代码示例,展示了Configuration.setAutoFlush()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.setAutoFlush()
方法的具体详情如下:
包路径:freemarker.template.Configuration
类名称:Configuration
方法名:setAutoFlush
暂无
代码示例来源:origin: baratine/baratine
@PostConstruct
public void init()
{
Configuration cfg = new Configuration(Configuration.VERSION_2_3_22);
cfg.setDefaultEncoding("UTF-8");
String templatePath = _config.get("view.freemarker.templates",
"classpath:/templates");
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (templatePath.startsWith("classpath:")) {
String path = templatePath.substring(("classpath:").length());
cfg.setClassLoaderForTemplateLoading(loader, path);
}
else {
throw new UnsupportedOperationException();
}
cfg.setAutoFlush(false);
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);
_cfg = cfg;
}
代码示例来源:origin: afranken/jmeter-analysis-maven-plugin
/**
* Initialize Freemarker Configuration
*/
public void initializeFreemarkerConfiguration() {
configuration = new Configuration();
//make maps work in Freemarker when map key is not a String
BeansWrapper beansWrapper = BeansWrapper.getDefaultInstance();
beansWrapper.setSimpleMapWrapper(true);
configuration.setObjectWrapper(beansWrapper);
//make sure that numbers are not formatted as 1,000 but as 1000 instead
configuration.setNumberFormat("computer");
//TODO: make configurable?
configuration.setDateFormat(ISO8601_FORMAT);
configuration.setAutoFlush(true);
}
代码示例来源:origin: com.github.becauseQA/becauseQA-utils
configuration = new Configuration(Configuration.VERSION_2_3_23);
configuration.setDefaultEncoding("UTF-8");
configuration.setAutoFlush(true);
configuration.setTemplateUpdateDelayMilliseconds(5000);// load from
代码示例来源:origin: com.github.becausetesting/commons
configuration = new Configuration(Configuration.VERSION_2_3_23);
configuration.setDefaultEncoding("UTF-8");
configuration.setAutoFlush(true);
configuration.setTemplateUpdateDelayMilliseconds(5000);// load from
内容来源于网络,如有侵权,请联系作者删除!