public class MustacheTemplateEngine extends Object implements TemplateEngine
TemplateEngine
implemented using JMustache.
Note that JMustache has been repackaged and embedded to prevent classpath conflicts.
Constructor and Description |
---|
MustacheTemplateEngine(TemplateResourceResolver templateResourceResolver)
Creates a new
MustacheTemplateEngine that will use the given
templateResourceResolver to resolve template paths. |
Modifier and Type | Method and Description |
---|---|
Template |
compileTemplate(String name)
Compiles the template at the given
path . |
public MustacheTemplateEngine(TemplateResourceResolver templateResourceResolver)
MustacheTemplateEngine
that will use the given
templateResourceResolver
to resolve template paths.templateResourceResolver
- The resolve to usepublic Template compileTemplate(String name) throws IOException
TemplateEngine
path
. Typically, a
TemplateResourceResolver
will be used to resolve the path into a resource
that can be read and compiled.compileTemplate
in interface TemplateEngine
name
- the path of the templateTemplate
IOException
- if compilation fails