- 授权协议: BSD
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/samskivert/jmustache
- 软件文档: http://samskivert.github.io/jmustache/apidocs/
软件介绍
jmustache 是 Mustache 模板引擎的java实现。
使用方法:
String text = "One, two, {{three}}. Three sir!"; Template tmpl = Mustache.compiler().compile(text); Map<String, String> data = new HashMap<String, String>(); data.put("three", "five"); System.out.println(tmpl.execute(data)); // result: "One, two, five. Three sir!"
示例2:
class Person { public final String name; public Person (String name, int age) { this.name = name; _age = age; } public int getAge () { return _age; } protected int _age; } String tmpl = "{{#persons}}{{name}}: {{age}}{{/persons}}\n"; Mustache.compiler().compile(tmpl).execute(new Object() { Object persons = Arrays.asList(new Person("Elvis", 75), new Person("Madonna", 52)); }); // result: // Elvis: 75 // Madonna: 52
html转js在线工具
html转js在线工具
UNIX 时间戳转换
UNIX 时间戳转换