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

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

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

Configuration.addAutoInclude介绍

[英]add a template to be automatically included at the top of any template that is vended by this Configuration object.
[中]添加一个模板,该模板将自动包含在此配置对象出售的任何模板的顶部。

代码示例

代码示例来源:origin: opoo/opoopress

private void initializeAutoIncludeTemplates(Site site, Configuration configuration) {
  List<String> autoIncludeTemplates = site.get(PROPERTY_PREFIX + "auto_include_templates");
  if (autoIncludeTemplates != null && !autoIncludeTemplates.isEmpty()) {
    for (String template : autoIncludeTemplates) {
      configuration.addAutoInclude(template);
      log.debug("Add auto include: " + template);
    }
  }
}

代码示例来源:origin: jpos/jPOS-EE

if(new File(cfgDir,DEPLOY_PROPERTIES_TEMPLATE).exists())
  config.addAutoInclude(DEPLOY_PROPERTIES_TEMPLATE);

代码示例来源:origin: com.netflix.pytheas/pytheas-core

);
fmConfig.addAutoInclude("/layout/bootstrap/form.ftl");

相关文章

微信公众号

最新文章

更多

Configuration类方法