public class ConfigurationFactory extends Object
| 构造器和说明 |
|---|
ConfigurationFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
static freemarker.template.Configuration |
instance(FreemarkerProperties props)
返回classes为加载器的Configuration,根路径为classes路径
|
static freemarker.template.Configuration |
instance(FreemarkerProperties props,
javax.servlet.ServletContext servletContext)
返回web项目的Configuration,加载路径为项目的根路径
|
static freemarker.template.Configuration |
webInstance()
获取WebappTemplateLoader的Configuration,当WEB_INSTANCE = null时,抛NullPointerException
|
public static freemarker.template.Configuration instance(FreemarkerProperties props) throws freemarker.template.TemplateException
props - 可以传null,为null时默认配置使用FreemarkerProperties.instance()freemarker.template.TemplateExceptionpublic static freemarker.template.Configuration instance(FreemarkerProperties props, javax.servlet.ServletContext servletContext) throws freemarker.template.TemplateException
props - 可以传null,为null时默认配置使用FreemarkerProperties.instance()servletContext - freemarker.template.TemplateExceptionpublic static freemarker.template.Configuration webInstance()
throws NullPointerException
NullPointerExceptionCopyright © 2017. All rights reserved.