javalite - ActiveWeb 视图 - <@compress single_line=true>
问题描述
我想知道以下声明/宏的用途是什么(我正在呈现自定义 JSON 响应):
<@compress single_line=true>
{
attribute_1: ${my_model.attribute_1},
attribute_2: ${my_model.attribute_2},
attribute_3: ${my_model.attribute_3},
}
</@compress>
谢谢你。
解决方案
这是 FreeMarker 的一个功能,请参阅https://freemarker.apache.org/docs/dgui_misc_whitespace.html
推荐阅读
- cmake - 为什么我需要可分离编译?
- javascript - 将图像 URL 转换为文件 - Javascript
- objective-c - 如何为表格 NSTabViewController 选择选项卡
- sql-server - 在 Visual Studio 2015 中构建 SQL CLR 项目
- ruby-on-rails - Ruby on Rails,图像不加载
- cakephp - cakephp 3中相同外键的一个模型中的多个belongTo关系
- jquery - 将按钮放置在 Kendo Grid 的所有行中的列中
- excel - Power 查询合并表任意对任意
- php - 找不到 torophp 类
- java - 如何在 Eclipse 中打开 gwt 设计器?