---
title: "jetbrick-template 1.2.2 发布，新增全局安全调用SafeCall"
author: "subchen"
date: "2014-02-23T23:39:10Z"
tags: []
categories: ["企业架构"]
slug: "jetbrick-template-1-2-2-safecall"
draft: false
lastmod: "2014-02-23T23:39:10Z"
id: 2020806
url: "https://subchen.iteye.com/blog/2020806"
---

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

 

![](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/)

 

 1. 新增全局安全调用SafeCall。

```
syntax.safecall = true
```

 2. 新增子包的引用

```
import.packages = sample.**
```

 

**其他改进：**

- \[新增] [#78 扩展 import.packages， 支持子包的导入](https://github.com/subchen/jetbrick-template/issues/78)
- \[新增] [#79 支持全局安全调用配置(SafeCall)](https://github.com/subchen/jetbrick-template/issues/79)
- \[修复] [#69 在weblogic用war部署，编译class有问题](https://github.com/subchen/jetbrick-template/issues/69)
- \[修复] [#76 如果默认的 jetbrick-template.properties 配置文件不存在，会报错](https://github.com/subchen/jetbrick-template/issues/76)
- \[修复] [#77 如果 template 放在 java 目录下，编译或出错](https://github.com/subchen/jetbrick-template/issues/77)