发布于 2017-03-27 00:01:01 | 97 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

FreeMarker 基于Java的模板引擎

FreeMarker是一个用Java语言编写的模板引擎,它基于模板来生成文本输出。FreeMarker与Web容器无关,即在Web运行时,它并不知道Servlet或HTTP。它不仅可以用作表现层的实现技术,而且还可以用于生成XML,JSP或Java 等。


Apache FreeMarker 2.3.26-incubating 发布了,这是一个稳定版,加上 "incubating" 是因为 Apache 软件基金会的要求(孵化中的项目),直到该项目成为完全接受(毕业的)Apache 项目为止。关于 FreeMaker 加入 Apache 孵化的新闻

处于孵化状态的项目不一定是反映了项目代码的完整性或稳定性,不过它确实表明了项目尚未得到 Apache 软件基金会的全面认可。

部分更新如下:

Changes on the FTL side

  • Added node?next_sibling and node?previous_sibling to move sideways in a node trees (see reference...). This works with XML DOM nodes, or with any custom TemplateNodeModelEx implementations.

  • Added new @@ keys to XML DOM models: @@next_sibling_element@@previous_sibling_element. These get the sibling node if that's an element, with the extra that they silently skip any whitespace text and comment and processing instruction between them. (See more about @@ keys here...)

  • Bug fixed (FREEMARKER-42): ?first now works with FTL collections (things that can be listed but doesn't support getting items by index), not only with sequences. The practical importance of this is that ?first now always works on Java Set-s (which is useful forSet-s with well defined ordering), while earlier it has failed depending on the object_wrapper configuration setting.

更新内容较多,详情请参阅完整更新日志发布主页

下载地址

或通过配置 Maven 获取:

<dependency>      <groupId>org.freemarker</groupId>      <artifactId>freemarker</artifactId>      <version>2.3.26-incubating</version>  </dependency>

FreeMarker 是一个模板引擎,一个基于模板生成文本输出的通用工具,使用纯 Java 编写。FreeMarker 被设计用来生成 HTML Web 页面,特别是基于 MVC 模式的应用程序。



历史版本 :
Apache FreeMarker 2.3.26-incubating,Java 模板引擎
FreeMarker 加入 Apache 孵化,发布 2.3.25 版本
FreeMarker 2.3.23 发布,Java 模板引擎
FreeMarker 2.3.23 RC1 发布,Java 模板引擎
FreeMarker 2.3.22 版本发布,Java 模板引擎
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务