软件简介

Trimou 是一个 Java 的模板引擎,实现了 Mustache ,但是 Helpers API 灵感来自于 Handlebars.js 。项目的目的是为了提供一个简单易于扩展的模板引擎。支持模板继承。

Maven

<dependency>
  <groupId>org.trimou</groupId>
  <artifactId>trimou-core</artifactId>
  <version>${version.trimou}</version></dependency>

示例代码

Mustache mustache = MustacheEngineBuilder
                    .newBuilder()
                    .build()
                    .compileMustache("hello", "Hello {{this}}!");
System.out.println(mustache.render("world"));
转载自: https://www.oschina.net/p/trimou