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

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

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

Configuration.getDefaultConfiguration介绍

[英]Returns the default (singleton) Configuration object. Note that you can create as many separate configurations as you wish; this global instance is provided for convenience, or when you have no reason to use a separate instance.
[中]返回默认(单例)配置对象。请注意,您可以根据需要创建任意多个单独的配置;提供此全局实例是为了方便,或者当您没有理由使用单独的实例时。

代码示例

代码示例来源:origin: org.freemarker/freemarker

/**
 * Creates a new instance. The parent will be {@link Configuration#getDefaultConfiguration()} initially, but it will
 * be changed to the real parent {@link Configuration} when this object is added to the {@link Configuration}. (It's
 * not allowed to add the same instance to multiple {@link Configuration}-s).
 */
public TemplateConfiguration() {
  super(Configuration.getDefaultConfiguration());
}

代码示例来源:origin: org.freemarker/freemarker

private static Configuration toNonNull(Configuration cfg) {
  return cfg != null ? cfg : Configuration.getDefaultConfiguration();
}

代码示例来源:origin: org.freemarker/freemarker

private static Template dummyTemplate() {
  try {
    return new Template(null, new StringReader(""), Configuration.getDefaultConfiguration());
  } catch (IOException e) {
    throw new RuntimeException("Failed to create dummy template", e);
  }
}

代码示例来源:origin: org.freemarker/com.springsource.freemarker

/**
 * A prime constructor to which all other constructors should
 * delegate directly or indirectly.
 */
private Template(String name, Configuration cfg)
{
  super(cfg != null ? cfg : Configuration.getDefaultConfiguration());
  this.name = name;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

/**
 * Creates a new instance. The parent will be {@link Configuration#getDefaultConfiguration()} initially, but it will
 * be changed to the real parent {@link Configuration} when this object is added to the {@link Configuration}. (It's
 * not allowed to add the same instance to multiple {@link Configuration}-s).
 */
public TemplateConfiguration() {
  super(Configuration.getDefaultConfiguration());
}

代码示例来源:origin: org.freemarker/freemarker-gae

/**
 * Creates a new instance. The parent will be {@link Configuration#getDefaultConfiguration()} initially, but it will
 * be changed to the real parent {@link Configuration} when this object is added to the {@link Configuration}. (It's
 * not allowed to add the same instance to multiple {@link Configuration}-s).
 */
public TemplateConfiguration() {
  super(Configuration.getDefaultConfiguration());
}

代码示例来源:origin: org.freemarker/freemarker-gae

private static Configuration toNonNull(Configuration cfg) {
  return cfg != null ? cfg : Configuration.getDefaultConfiguration();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

private static Configuration toNonNull(Configuration cfg) {
  return cfg != null ? cfg : Configuration.getDefaultConfiguration();
}

代码示例来源:origin: org.freemarker/freemarker-gae

private static Template dummyTemplate() {
  try {
    return new Template(null, new StringReader(""), Configuration.getDefaultConfiguration());
  } catch (IOException e) {
    throw new RuntimeException("Failed to create dummy template", e);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

private static Template dummyTemplate() {
  try {
    return new Template(null, new StringReader(""), Configuration.getDefaultConfiguration());
  } catch (IOException e) {
    throw new RuntimeException("Failed to create dummy template", e);
  }
}

相关文章

Configuration类方法