freemarker${}包含${}

Posted c-h-y

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了freemarker${}包含${}相关的知识,希望对你有一定的参考价值。

${}包含${}

freemarker还是比较只能的,只是你自己复杂化了

比如有两个集合 books跟users

你可以这么取值吗,索引是有关联关系的

<#list users as user>

  ${user.name}       //正常取值

  ${books[user_index]}  //这么取值是错误的 ${books[${user__index}]}   内嵌的话是不需要加{}的。

</#list>

 

以上是关于freemarker${}包含${}的主要内容,如果未能解决你的问题,请参考以下文章