Freemarker的三目用法

在Freemarker中不支持三目表达式(bool ? true: false ),但是有替代其功能的freemarker表达式。


可以使用?string和?then进行类三目的操作。

bool ?string('yes',no)

bool ?then('yes','no')


更具体的直接点击下方资源链接,看官方文档的详细说明吧。

freemarker关于?string和?then的介绍

posted @ 2023-03-01 18:25  星小梦  阅读(889)  评论(0)    收藏  举报