mybatis獲取map中的key和value

低版本mybatis 

 <foreach collection="mapInfo.entrySet()"  item="item" index="index" separator=",">
        ${item.key} = VALUES ( #{item.value} ) 
    </foreach>

高版本

 <foreach collection="eventExtdInfo.entrySet()"  item="item" index="key" separator=",">
        ${key} =  #{item} 
    </foreach>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章