thymeleaf:访问list,map等
时间:2018-05-07 10:47:41
收藏:0
阅读:785
1.map
在后端放入一个map
Map<String, String> mapDict = serviceBaseDict.selectMap(ConstantDictType.SYSINFO);
model.addAttribute("mapDict", mapDict);在页面中访问这个map
<b th:value="${mapDict[‘sysInfo’]}">系统标题</b>
也可以这样访问:
<b th:value="${mapDict.get(‘sysInfo’)}">系统标题</b>
原文:https://www.cnblogs.com/huiy/p/9001364.html
评论(0)