按照Map中某个字段进行分组:
dataList.stream().collect(Collectors.groupingBy(group -> group.get("name").toString()));
按照Map中某些字段组合进行分组:
dataList.stream().collect(Collectors.groupingBy(this::groupMethod);
private String groupMethod(Map<String,Object> map){
return map.get("name").toString() + "#" + map.get("age").toString();
}