freemarker.template.Configuration.setAutoFlush()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中freemarker.template.Configuration.setAutoFlush()方法的一些代码示例,展示了Configuration.setAutoFlush()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.setAutoFlush()方法的具体详情如下:
包路径:freemarker.template.Configuration
类名称:Configuration
方法名:setAutoFlush

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

相关文章

Configuration类方法