本文整理了Java中freemarker.template.Configuration.getDefaultConfiguration()
方法的一些代码示例,展示了Configuration.getDefaultConfiguration()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getDefaultConfiguration()
方法的具体详情如下:
包路径:freemarker.template.Configuration
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!