stream根据map中的一个字段排序
org = org.stream().sorted(Comparator.comparing(SynchronousDataService::sort2)).collect(Collectors.toList());// 排序
private static String sort2(Map<String, Object> a) {
return (String) a.get("uri");
}
org = org.stream().sorted(Comparator.comparing(SynchronousDataService::sort2)).collect(Collectors.toList());// 排序
private static String sort2(Map<String, Object> a) {
return (String) a.get("uri");
}