---
title: "新一代Java模板引擎 jetbrick-template 1.1.3 发布"
author: "subchen"
date: "2013-12-23T09:41:22Z"
tags: []
categories: ["企业架构"]
slug: "java-jetbrick-template-1-1-3"
draft: false
lastmod: "2013-12-23T09:41:22Z"
id: 1993826
url: "https://subchen.iteye.com/blog/1993826"
---

全面超越 Velocity 的全新一代 Java 模板引擎 jetbrick-template 1.1.3 正式版发布。 

 

![](http://dl2.iteye.com/upload/attachment/0091/9828/b2bcca2d-3f66-34a4-bfba-62d192a7b157.jpg)

 

**jetbrick-template 是一个新一代 Java 模板引擎，具有高性能和高扩展性。** 适合于动态 HTML 页面输出或者代码生成，可替代 JSP 页面或者 Velocity 等模板。 指令和 Velocity 相似，表达式和 Java 保持一致，易学易用。 

 

- 支持类似与 Velocity 的多种指令
- 支持静态编译
- 支持编译缓存
- 支持热加载
- 支持类型推导
- 支持泛型
- 支持可变参数方法调用
- 支持方法重载
- 支持类似于 Groovy 的方法扩展
- 支持函数扩展
- 支持自定义标签 #tag
- 支持宏定义 #macro
- 支持布局 Layout

**项目地址**：[http://subchen.github.io/jetbrick-template/index.html](http://subchen.github.io/jetbrick-template/index.html)   
**在线中文文档**：[http://subchen.github.io/jetbrick-template/](http://subchen.github.io/jetbrick-template/overview.html)

**范例参考：**[https://github.com/subchen/jetbrick-template-webmvc-samples/](https://github.com/subchen/jetbrick-template-webmvc-samples/)

 

 新版支持Jodd集成，以及了对配置文件变量的支持：

```
template.path = ${webapp.dir}/WEB-INF/jetx_sources
compile.path = ${webapp.dir}/WEB-INF/jetx_classes
```

 

**其他改进包括：** 

- \[新增] [#50 增加 Jodd Madvoc 的集成支持](https://github.com/subchen/jetbrick-template/issues/50)
- \[新增] [#56 增加 MultipathResourceLoader，支持多个模板路径](https://github.com/subchen/jetbrick-template/issues/56)
- \[增强] [#52 增强 asDate() 方法，默认支持更多的格式，比如 ISO8601, RFC 822](https://github.com/subchen/jetbrick-template/issues/52)
- \[增强] [#55 对#for指令的增强建议](https://github.com/subchen/jetbrick-template/issues/55)
- \[增强] [#57 增强 template.path 和 compile.path 的配置功能](https://github.com/subchen/jetbrick-template/issues/57)
- \[增强] [#58 为JetEngineFactoryBean提供构造注入方式的spring配置](https://github.com/subchen/jetbrick-template/issues/58)
- \[修复] [#53 engine.createTemplate("你好") 编译失败](https://github.com/subchen/jetbrick-template/issues/53)
- \[修复] [#59 JetUtils.asBoolean() 对 Collection 和 Map 的判断有误](https://github.com/subchen/jetbrick-template/issues/59)
- \[修复] [#60 #if (obj == null) 报错，invalid token null](https://github.com/subchen/jetbrick-template/issues/60)
- \[修复] [#61 import.variables 如果存在多个泛型类型定义会报错](https://github.com/subchen/jetbrick-template/issues/61)