Thymeleaf显示Map集合数据

<select class="form-control zz-set-input-size" id="channel">
<option value="">请选择</option>
<option th:each="channel,index:${allChannels}"  th:value="${channel.key}"  th:text="${channel.value}"></option>
</select>

map的两个属性:key和value

posted @ 2019-01-21 14:23  y-xs  阅读(6343)  评论(0编辑  收藏  举报