Class MustacheResourceTemplateLoader

  • All Implemented Interfaces:
    com.samskivert.mustache.Mustache.TemplateLoader, org.springframework.beans.factory.Aware, org.springframework.context.ResourceLoaderAware

    public class MustacheResourceTemplateLoader
    extends Object
    implements com.samskivert.mustache.Mustache.TemplateLoader, org.springframework.context.ResourceLoaderAware
    Mustache TemplateLoader implementation that uses a prefix, suffix and the Spring Resource abstraction to load a template from a file, classpath, URL etc. A Mustache.TemplateLoader is needed in the Mustache.Compiler when you want to render partials (i.e. tiles-like features).
    Since:
    1.2.2
    See Also:
    Mustache, Resource
    • Method Detail

      • setCharset

        public void setCharset​(String charSet)
        Set the charset.
        Parameters:
        charSet - the charset
      • setResourceLoader

        public void setResourceLoader​(org.springframework.core.io.ResourceLoader resourceLoader)
        Set the resource loader.
        Specified by:
        setResourceLoader in interface org.springframework.context.ResourceLoaderAware
        Parameters:
        resourceLoader - the resource loader