List<Map> rolenos=userInfo.getUserRoles();
Iterator it = rolenos.iterator();
List rolenosList = new ArrayList();
while(it.hasNext()){
Map map = (Map)it.next();
Set<String> keySet = map.keySet();
//遍历key集合,获取value
for(String key : keySet) {
rolenosList.add(key);
System.out.println("key:"+key);
}
}
Map遍历
最新推荐文章于 2024-01-29 11:00:29 发布