public class EnjoyEngine extends Object implements TemplateEngine
Constructor and Description |
---|
EnjoyEngine()
默认构造
|
EnjoyEngine(com.jfinal.template.Engine engine)
构造
|
EnjoyEngine(TemplateConfig config)
构造
|
Modifier and Type | Method and Description |
---|---|
com.jfinal.template.Engine |
getRawEngine()
获取原始引擎的钩子方法,用于自定义特殊属性,如插件等
|
Template |
getTemplate(String resource)
获取模板
|
TemplateEngine |
init(TemplateConfig config)
使用指定配置文件初始化模板引擎
|
public EnjoyEngine()
public EnjoyEngine(TemplateConfig config)
config
- 模板配置public EnjoyEngine(com.jfinal.template.Engine engine)
engine
- Engine
public TemplateEngine init(TemplateConfig config)
TemplateEngine
init
in interface TemplateEngine
config
- 配置文件public Template getTemplate(String resource)
TemplateEngine
getTemplate
in interface TemplateEngine
resource
- 资源,根据实现不同,此资源可以是模板本身,也可以是模板的相对路径public com.jfinal.template.Engine getRawEngine()
Engine
Copyright © 2024. All rights reserved.