Refine search
/** * Create a {@code MustacheViewResolver} backed by a default instance of a * {@link Compiler}. */ public MustacheViewResolver() { this.compiler = Mustache.compiler(); setViewClass(requiredViewClass()); }
/** Compiles the supplied template into a repeatedly executable intermediate form. */ public Template compile (Reader source) { return Mustache.compile(source, this); }
restoreStartTag(text, delims); break; case MATCHING_END: restoreStartTag(text, delims); text.append(delims.end1); break;
restoreStartTag(text, delims); accum.addTextSegment(text); tagStartColumn = column;
/** * Create a {@code MustacheViewResolver} backed by a default instance of a * {@link Compiler}. */ public MustacheViewResolver() { this.compiler = Mustache.compiler(); setViewClass(requiredViewClass()); }
restoreStartTag(text, delims); break; case MATCHING_END: restoreStartTag(text, delims); text.append(delims.end1); break;
/** Compiles the supplied template into a repeatedly executable intermediate form. */ public Template compile (Reader source) { return Mustache.compile(source, this); }
@Override protected Mustache.Compiler createViewFactory(ResourceLoader templateLoader) { return Mustache.compiler().withLoader(loader(templateLoader)); }
restoreStartTag(text, delims); accum.addTextSegment(text); tagStartColumn = column;
private static Compiler mustacheCompiler() { return Mustache.compiler().withLoader(mustacheTemplateLoader()); }
MustacheServiceImpl() { this.compiler = Mustache.compiler(); }
/** * Compile template. * * @return * @throws IOException Signals that an I/O exception has occurred. */ protected static Template compileTemplate(Path templateFilepath) throws IOException { Compiler compiler = Mustache.compiler(); String templateHtml = new String(Files.readAllBytes(templateFilepath), StandardCharsets.UTF_8); return compiler.compile(templateHtml); }
private static Mustache.Compiler createCompiler() { return Mustache.compiler().escapeHTML(false); }
private static Mustache.Compiler createCompiler() { return Mustache.compiler().escapeHTML(false); }
@Bean public Mustache.Compiler mustacheCompiler(TemplateLoader loader) { return compiler().escapeHTML(false).withLoader(loader); }
/** * Create a {@code MustacheViewResolver} backed by a default instance of a * {@link Compiler}. */ public MustacheViewResolver() { this.compiler = Mustache.compiler(); setViewClass(requiredViewClass()); }
/** * Merges the specified template using the supplied mapping of string keys to objects. * * @return a string containing the merged text. */ protected String mergeTemplate (String template, Map<String, Object> data) throws IOException { Reader reader = new InputStreamReader(getClass().getClassLoader().getResourceAsStream(template), UTF_8); return convertEols(Mustache.compiler().escapeHTML(false).compile(reader).execute(data)); }