public class TemplateConfig extends Object implements Serializable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TemplateConfig.ResourceMode
资源加载方式枚举
|
| 构造器和说明 |
|---|
TemplateConfig()
默认构造,使用UTF8编码,默认从ClassPath获取模板
|
TemplateConfig(Charset charset,
String path,
TemplateConfig.ResourceMode resourceMode)
构造
|
TemplateConfig(String path)
构造,默认UTF-8编码
|
TemplateConfig(String path,
TemplateConfig.ResourceMode resourceMode)
构造,默认UTF-8编码
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj) |
Charset |
getCharset()
获取编码
|
String |
getPath()
获取模板路径,如果ClassPath或者WebRoot模式,则表示相对路径
|
TemplateConfig.ResourceMode |
getResourceMode()
获取模板资源加载方式
|
int |
hashCode() |
void |
setCharset(Charset charset)
设置编码
|
void |
setPath(String path)
设置模板路径,如果ClassPath或者WebRoot模式,则表示相对路径
|
void |
setResourceMode(TemplateConfig.ResourceMode resourceMode)
设置模板资源加载方式
|
public TemplateConfig()
public TemplateConfig(String path)
path - 模板路径,如果ClassPath或者WebRoot模式,则表示相对路径public TemplateConfig(String path, TemplateConfig.ResourceMode resourceMode)
path - 模板路径,如果ClassPath或者WebRoot模式,则表示相对路径resourceMode - 模板资源加载方式public TemplateConfig(Charset charset, String path, TemplateConfig.ResourceMode resourceMode)
charset - 编码path - 模板路径,如果ClassPath或者WebRoot模式,则表示相对路径resourceMode - 模板资源加载方式public Charset getCharset()
public void setCharset(Charset charset)
charset - 编码public String getPath()
public void setPath(String path)
path - 模板路径public TemplateConfig.ResourceMode getResourceMode()
public void setResourceMode(TemplateConfig.ResourceMode resourceMode)
resourceMode - 模板资源加载方式Copyright © 2018. All rights reserved.