关于freemarker里面的hashmap使用问题
在java类中:
Map<String, Object> data;data = new HashMap<String, Object>();data.put(String,Object);ftl使用:<#list data?keys as testKey>//data为map的对象<#if testKey=”xxx”>?//假如只需获取其中String为xxx的内容//假如Object为list对象,循环遍历操作 start<#list (data.get(testKey))! as list>${list.title}//Object的某个属性</#list>//循环遍历操作?End</#if></#list>备忘…