public abstract class FreeMarkerTemplateUtils
extends java.lang.Object
| Constructor and Description |
|---|
FreeMarkerTemplateUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
processTemplateIntoString(freemarker.template.Template template,
java.lang.Object model)
Process the specified FreeMarker template with the given model and write
the result to the given Writer.
|
public static java.lang.String processTemplateIntoString(freemarker.template.Template template,
java.lang.Object model)
throws java.io.IOException,
freemarker.template.TemplateException
When using this method to prepare a text for a mail to be sent with Spring's mail support, consider wrapping IO/TemplateException in MailPreparationException.
model - the model object, typically a Map that contains model names
as keys and model objects as valuesjava.io.IOException - if the template wasn't found or couldn't be readfreemarker.template.TemplateException - if rendering failedMailPreparationException