freemarker list size问题
2019独角兽企业重金招聘Python工程师标准>>> 取得list的长度:${fields?size}。 而使用判断其长度的时候, <#if fields?size>0 > </#if> 竟抛出错了,说不是boolean类型, Java backtrace for programmers: ---------- freemarker.core.NonBooleanException: Error on line 132, column 22 in viewEntity_js.ftl Expecting a boolean (true/false) expression here Expression fields?size does not evaluate to true/false it is an instance of freemarker.template.SimpleNumber at freemarker.core.Expression.isTrue(Expression.java:150) <#if (fields?size>0) > </#if> 转载于:https://my.oschina.net/joeyjava/blog/271569 文章来源: https://blog.csdn.net/weixin_34257076/article/details