(root) | +- mouse = "Yerri" | +- age = 12 | +- color = "brown"> ${mouse} <#-- use mouse as scalar -->${mouse.age} <#-- use mouse as hash -->${mouse.color} <#-- use mouse as hash --> Yerri12brown The average of 3 and 5 is: ${avg(3, 5)}The average of 6 and 10 and 20 is: ${avg(6, 10, 20)}The average of the price of python and elephant is: ${avg(animals.python.price, animals.elephant.price)}
博客介绍了Freemarker的数据模型,包括基础的三种基本对象类型scalars、hashes和sequences,以及方法、用户自定义FTL标记等。还分别阐述了Scalar变量、hashes、sequences和集合、方法、宏和变换器、节点等的特点和用途,部分高级特性会在后续章节讲述。
9681





