类 VelocityEngineUtils
- java.lang.Object
- org.springframework.ui.velocity.VelocityEngineUtils
@Deprecated public abstract class VelocityEngineUtils extends Object
已过时。as of Spring 4.3, in favor of FreeMarkerUtility class for working with a VelocityEngine. Provides convenience methods to merge a Velocity template with a model.- 从以下版本开始:
- 22.01.2004
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 VelocityEngineUtils()
已过时。
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static void
mergeTemplate(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, String encoding, Map<String,Object> model, Writer writer)
已过时。Merge the specified Velocity template with the given model and write the result to the given Writer.static void
mergeTemplate(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, Map<String,Object> model, Writer writer)
已过时。UsemergeTemplate(VelocityEngine, String, String, Map, Writer)
instead, following Velocity 1.6's corresponding deprecation in its own API.static String
mergeTemplateIntoString(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, String encoding, Map<String,Object> model)
已过时。Merge the specified Velocity template with the given model into a String.static String
mergeTemplateIntoString(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, Map<String,Object> model)
已过时。UsemergeTemplateIntoString(VelocityEngine, String, String, Map)
instead, following Velocity 1.6's corresponding deprecation in its own API.
构造器详细资料
VelocityEngineUtils
public VelocityEngineUtils()
已过时。
方法详细资料
mergeTemplate
@Deprecated public static void mergeTemplate(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, Map<String,Object> model, Writer writer) throws org.apache.velocity.exception.VelocityException
已过时。UsemergeTemplate(VelocityEngine, String, String, Map, Writer)
instead, following Velocity 1.6's corresponding deprecation in its own API.Merge the specified Velocity template with the given model and write the result to the given Writer.- 参数:
velocityEngine
- VelocityEngine to work withtemplateLocation
- the location of template, relative to Velocity's resource loader pathmodel
- the Map that contains model names as keys and model objects as valueswriter
- the Writer to write the result to- 抛出:
org.apache.velocity.exception.VelocityException
- if the template wasn't found or rendering failed
mergeTemplate
public static void mergeTemplate(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, String encoding, Map<String,Object> model, Writer writer) throws org.apache.velocity.exception.VelocityException
已过时。Merge the specified Velocity template with the given model and write the result to the given Writer.- 参数:
velocityEngine
- VelocityEngine to work withtemplateLocation
- the location of template, relative to Velocity's resource loader pathencoding
- the encoding of the template filemodel
- the Map that contains model names as keys and model objects as valueswriter
- the Writer to write the result to- 抛出:
org.apache.velocity.exception.VelocityException
- if the template wasn't found or rendering failed
mergeTemplateIntoString
@Deprecated public static String mergeTemplateIntoString(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, Map<String,Object> model) throws org.apache.velocity.exception.VelocityException
已过时。UsemergeTemplateIntoString(VelocityEngine, String, String, Map)
instead, following Velocity 1.6's corresponding deprecation in its own API.Merge the specified Velocity template with the given model into a String.When using this method to prepare a text for a mail to be sent with Spring's mail support, consider wrapping VelocityException in MailPreparationException.
- 参数:
velocityEngine
- VelocityEngine to work withtemplateLocation
- the location of template, relative to Velocity's resource loader pathmodel
- the Map that contains model names as keys and model objects as values- 返回:
- the result as String
- 抛出:
org.apache.velocity.exception.VelocityException
- if the template wasn't found or rendering failed- 另请参阅:
MailPreparationException
mergeTemplateIntoString
public static String mergeTemplateIntoString(org.apache.velocity.app.VelocityEngine velocityEngine, String templateLocation, String encoding, Map<String,Object> model) throws org.apache.velocity.exception.VelocityException
已过时。Merge the specified Velocity template with the given model into a String.When using this method to prepare a text for a mail to be sent with Spring's mail support, consider wrapping VelocityException in MailPreparationException.
- 参数:
velocityEngine
- VelocityEngine to work withtemplateLocation
- the location of template, relative to Velocity's resource loader pathencoding
- the encoding of the template filemodel
- the Map that contains model names as keys and model objects as values- 返回:
- the result as String
- 抛出:
org.apache.velocity.exception.VelocityException
- if the template wasn't found or rendering failed- 另请参阅:
MailPreparationException