public class DreamTemplate
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
| 构造器和说明 |
|---|
DreamTemplate(DreamProperties dreamProperties) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
org.springframework.context.ApplicationContext |
getApplicationContext() |
java.lang.String |
render(java.lang.String html,
java.lang.Object data)
渲染html字符串
|
java.lang.String |
renderTpl(java.lang.String tplName,
java.lang.Object data)
渲染html字符串
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public DreamTemplate(DreamProperties dreamProperties)
public java.lang.String renderTpl(java.lang.String tplName,
java.lang.Object data)
tplName - 模板名称data - 数据模型public java.lang.String render(java.lang.String html,
java.lang.Object data)
html - html字符串data - 数据模型public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic org.springframework.context.ApplicationContext getApplicationContext()