Class MustacheEngine
- java.lang.Object
-
- com.github.mjeanroy.springmvc.view.mustache.nashorn.MustacheEngine
-
@Deprecated public final class MustacheEngine extends Object
Deprecated.Nashorn will be removed after jdk 11, so nashorn engine ill be removed in the next major version.Nashorn engine that can be used to render Mustache rendering.
-
-
Constructor Summary
Constructors Constructor Description MustacheEngine(MustacheTemplateLoader templateLoader)
Deprecated.Build nashorn engine with default mustache js implementation.MustacheEngine(MustacheTemplateLoader templateLoader, InputStream mustacheJs)
Deprecated.Build nashorn engine with default mustache js implementation.MustacheEngine(MustacheTemplateLoader templateLoader, String mustacheJs)
Deprecated.Build nashorn engine with default mustache js implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
Deprecated.int
hashCode()
Deprecated.String
render(String template, Map<String,Object> model)
Deprecated.Render template with given model object.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
MustacheEngine
public MustacheEngine(MustacheTemplateLoader templateLoader)
Deprecated.Build nashorn engine with default mustache js implementation. Mustache file will be searched into classpath: - First, try to locate webjars. - Then, try to locate into bower_components directory. - Finally, try to locate into "generic" directory ("vendors" or "js" directories). If everything fail, an exception will be thrown.- Parameters:
templateLoader
- Template loader, used to resolve partials.- Throws:
MustacheIOException
- If everything fail.
-
MustacheEngine
public MustacheEngine(MustacheTemplateLoader templateLoader, String mustacheJs)
Deprecated.Build nashorn engine with default mustache js implementation. Mustache file is given as a second parameter and is resolved against classpath.- Parameters:
templateLoader
- Template loader, used to resolve partials.mustacheJs
- Mustache JavaScript file (asInputStream
instance).- Throws:
MustacheIOException
- If script does not exist.
-
MustacheEngine
public MustacheEngine(MustacheTemplateLoader templateLoader, InputStream mustacheJs)
Deprecated.Build nashorn engine with default mustache js implementation. Mustache file is given as a second parameter and is resolved against classpath.- Parameters:
templateLoader
- Template loader, used to resolve partials.mustacheJs
- Mustache JavaScript file (asInputStream
instance).- Throws:
MustacheIOException
- If script does not exist.
-
-