0
在Freemarker中,我有一個Map<Long, ...>
(關鍵是Long
)。Freemarker - 查詢地圖<Long, ...>
Freemarker的map[key]
只支持字符串鍵。所以我試過map?api.get(0)
,但表現得像價值不在那裏。然而,如果我做
<#list statsForThisBox as projID, val>
Project #${projID?c} has value: <b>${val???c}</b>
</#list>
然後我看到條目在那裏。
項目#64256具有價值:真 項目#0具有價值:真
有沒有一種方法來查詢Map
爲Long
關鍵?(除了創建Java中的一個特殊功能)
編輯:我想到的是像
map?api.get("java.util.Long"?new(123))