public class VelocityEngine extends Object implements TemplateEngine
| Constructor and Description |
|---|
VelocityEngine()
默认构造
|
VelocityEngine(TemplateConfig config)
构造
|
VelocityEngine(org.apache.velocity.app.VelocityEngine engine)
构造
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.velocity.app.VelocityEngine |
getRaw()
获取原始的引擎对象
|
Template |
getTemplate(String resource)
获取模板
|
TemplateEngine |
init(TemplateConfig config)
使用指定配置文件初始化模板引擎
|
public VelocityEngine()
public VelocityEngine(TemplateConfig config)
config - 模板配置public VelocityEngine(org.apache.velocity.app.VelocityEngine engine)
engine - VelocityEnginepublic TemplateEngine init(TemplateConfig config)
TemplateEngineinit in interface TemplateEngineconfig - 配置文件public org.apache.velocity.app.VelocityEngine getRaw()
public Template getTemplate(String resource)
TemplateEnginegetTemplate in interface TemplateEngineresource - 资源,根据实现不同,此资源可以是模板本身,也可以是模板的相对路径Copyright © 2025. All rights reserved.