FreeMarker 2.3.23 中文手册

FreeMarker 介绍

FreeMarker 是一款功能强大的 Java 模板引擎,广泛应用于生成动态 HTML、XML 或文本格式文档。

FreeMarker 特性

  • 模板驱动的: FreeMarker 使用模板来生成文档,模板包含静态文本和动态数据占位符。
  • 数据模型绑定: 模板可以访问来自 Java 对象模型(数据模型)的数据,并将其插入到输出中。
  • 指令和控制结构: FreeMarker 指令提供对模板结构和行为的控制,包括条件判断、循环和导入。
  • 字符串操作和函数: FreeMarker 内置了许多函数,用于处理字符串、日期、集合和其他操作。

模板设计模式

  • 分离关注点:模板专注于布局和显示,而逻辑和数据处理留在 Java 代码中。
  • 模板继承和导入:通过模板继承和导入,可以实现模板的重用和模块化。
  • 宏:宏是可重用的模板片段,可以简化代码并提高可维护性。

控制结构

  • 条件语句:FreeMarker 支持 if-else 语句和 switch 语句用于条件判断。
  • 循环结构:FreeMarker 提供了 foreach 和 sequence 指令,用于迭代集合和数组。
  • 控制流程:FreeMarker 提供了 break、continue 和 return 语句,用于控制程序流。
zip
FreeMarker_2.3.23_Manual_zh_CN.zip 预估大小:199个文件
file
versions_2_3_21.html 85KB
file
pgui_config_settings.html 17KB
file
versions_2_3_20.html 39KB
file
ref_builtins_loop_var.html 24KB
file
dgui_misc_whitespace.html 20KB
file
ref_directive_include.html 21KB
file
dgui_datamodel.html 7KB
file
eclipse-toc.xml 14KB
file
dgui_quickstart_basics.html 12KB
file
overview.png 12KB
file
tree.png 5KB
file
model2sketch.png 21KB
file
ref_directive_local.html 9KB
file
versions_2_3.html 81KB
file
ref_builtins_hash.html 9KB
file
index.html 9KB
file
pgui_misc_xml_legacy.html 23KB
file
versions_2_1_2.html 10KB
file
versions_2_3_3.html 15KB
file
versions_2_2_5.html 8KB
file
favicon.png 1KB
file
ref_builtins_number.html 23KB
file
versions_2_3_12.html 8KB
file
ref_directive_t.html 10KB
file
dgui_quickstart_datamodel.html 13KB
file
dgui_misc_userdefdir.html 27KB
file
sitemap.xml 15KB
file
versions_2_0RC1.html 18KB
file
xgui_preface.html 8KB
file
xgui_expose_put.html 9KB
file
ref_directive_import.html 12KB
file
ref.html 12KB
file
ref_directive_nt.html 8KB
file
ref_directive_alphaidx.html 12KB
file
dgui_quickstart.html 8KB
file
versions_2_1_3.html 9KB
file
ref_builtins_string.html 71KB
file
pgui_misc_logging.html 14KB
file
ref_builtins_sequence.html 25KB
file
pgui_config.html 8KB
file
app.html 12KB
file
dgui_misc.html 8KB
file
ref_directive_ftl.html 17KB
file
gloss.html 31KB
file
versions_2_3_17.html 22KB
file
ref_depr_builtin.html 10KB
file
dgui_template_directives.html 13KB
file
versions_2_3_23.html 25KB
file
versions_2_1_5.html 9KB
file
versions_2_01.html 8KB
file
versions_2_1_4.html 8KB
file
dgui_quickstart_template.html 32KB
file
dgui_misc_namespace.html 21KB
file
ref_directive_if.html 12KB
file
ref_directive_switch.html 12KB
file
pgui_misc_servlet.html 35KB
file
versions_2_2_7.html 8KB
file
xgui_imperative.html 7KB
file
dgui_misc_var.html 14KB
file
versions_2_3_18.html 8KB
file
app_versions.html 12KB
file
ref_directive_global.html 11KB
file
dgui.html 9KB
file
versions_2_0RC3.html 10KB
file
ref_directive_function.html 11KB
file
pgui_misc.html 8KB
file
toc.html 26KB
file
versions_2_2_3.html 9KB
file
detailed-toc.html 85KB
file
xgui_declarative.html 7KB
file
app_legal.html 7KB
file
pgui.html 11KB
file
app_install.html 9KB
file
xgui.html 8KB
file
pgui_misc_charset.html 13KB
file
pgui_datamodel.html 8KB
file
ref_builtins.html 8KB
file
ref_directive_visit.html 19KB
file
pgui_quickstart_createdatamodel.html 12KB
file
ref_directive_flush.html 9KB
file
pgui_misc_beanwrapper.html 39KB
file
versions_2_3_15.html 9KB
file
ref_depr_transform.html 11KB
file
versions_2_3_7.html 14KB
file
app_eccn.html 7KB
file
pgui_datamodel_directive.html 20KB
file
ref_builtins_node.html 14KB
file
versions_2_3_6.html 8KB
file
ref_builtins_type_independent.html 15KB
file
versions_2_2.html 59KB
file
ref_directive_setting.html 25KB
file
ref_deprecated.html 8KB
file
dgui_template_overallstructure.html 13KB
file
pgui_misc_jythonwrapper.html 11KB
file
dgui_misc_alternativesyntax.html 11KB
file
pgui_datamodel_basics.html 11KB
file
ref_depr_oldsyntax.html 11KB
file
versions_2_3_14.html 11KB
file
xgui_expose.html 7KB
file
ref_builtins_alphaidx.html 20KB
file
pgui_datamodel_scalar.html 12KB
file
versions_2_3_2.html 8KB
file
versions_2_1_1.html 10KB
file
versions_2_3_16.html 10KB
file
versions_2_3_8.html 9KB
file
pgui_datamodel_node.html 10KB
file
versions_2_1.html 30KB
file
versions_2_2_4.html 9KB
file
dgui_template_exp.html 88KB
file
xgui_declarative_basics.html 13KB
file
versions_2_3_7rc1.html 11KB
file
dgui_datamodel_basics.html 14KB
file
pgui_quickstart.html 8KB
file
dgui_template.html 8KB
file
ref_directive_escape.html 13KB
file
ref_directive_stop.html 8KB
file
versions_2_0RC2.html 16KB
file
pgui_misc_var.html 10KB
file
ref_directive_assign.html 14KB
file
versions_2_3_9.html 10KB
file
pgui_quickstart_merge.html 9KB
file
versions_2_3_4.html 10KB
file
versions_2_2_2.html 8KB
file
pgui_datamodel_parent.html 11KB
file
ref_directive_macro.html 20KB
file
ref_specvar.html 17KB
file
pgui_misc_secureenv.html 9KB
file
versions_2_3_1.html 21KB
file
xgui_imperative_formal.html 27KB
file
ref_directive_noparse.html 8KB
file
pgui_quickstart_all.html 9KB
file
ref_directive_compress.html 9KB
file
versions_2_2_8.html 9KB
file
ref_builtins_date.html 25KB
file
ref_directive_userDefined.html 17KB
file
versions_2_3_13.html 11KB
file
versions_2_3_22.html 73KB
file
logo.png 10KB
file
pgui_misc_ant.html 11KB
file
ref_depr_oldmacro.html 13KB
file
versions_2_2_6.html 11KB
file
pgui_config_incompatible_improvements.html 13KB
file
xgui_imperative_learn.html 31KB
file
app_license.html 9KB
file
pgui_misc_multithreading.html 9KB
file
ref_depr_directive.html 9KB
file
pgui_quickstart_gettemplate.html 9KB
file
xgui_declarative_details.html 14KB
file
dgui_datamodel_types.html 22KB
file
pgui_config_sharedvariables.html 10KB
file
pgui_config_errorhandling.html 20KB
file
toc.js 66KB
file
pgui_config_basics.html 9KB
file
ref_builtins_boolean.html 14KB
file
versions_2_3_5.html 13KB
file
pgui_datamodel_method.html 10KB
file
pgui_config_templateloading.html 22KB
file
versions_2_0.html 11KB
file
app_faq.html 75KB
file
versions_2_3_11.html 15KB
file
pgui_datamodel_objectWrapper.html 24KB
file
alphaidx.html 73KB
file
ref_builtins_expert.html 30KB
file
versions_2_3_10.html 10KB
file
ref_depr_numerical_interpolation.html 11KB
file
ref_directives.html 10KB
file
versions_2_3_19.html 17KB
file
versions_2_2_1.html 11KB
file
pgui_quickstart_createconfiguration.html 10KB
file
dgui_template_valueinsertion.html 21KB
file
ref_directive_attempt.html 14KB
file
versions_2_3_24.html 8KB
file
main.js 5KB
file
patterned-bg.png 4KB
file
xxe.png 3KB
file
9.gif 968B
file
4.gif 968B
file
11.gif 244B
file
3.gif 968B
file
6.gif 968B
file
2.gif 968B
file
7.gif 968B
file
5.gif 968B
file
14.gif 244B
file
12.gif 244B
file
10.gif 968B
file
1.gif 968B
file
13.gif 244B
file
8.gif 968B
file
main.min.js 2KB
file
docgen.css 26KB
file
icomoon.woff 4KB
file
icomoon.ttf 4KB
file
icomoon.svg 10KB
file
icomoon.eot 4KB
file
docgen.min.css 21KB
file
xgui_expose_dom.html 11KB
file
ref_directive_list.html 26KB
file
ref_reservednames.html 8KB
...
zip 文件大小:913KB