public static void main(String[] args) {
List> allClientInfoList = new ArrayList>();
Map map1 = new HashMap();
map1.put("clientName", "测试");
map1.put("certificateNo", "1111");
map1.put("certificateType", "01");
map1.put("personnelFlag", "1");
Map map2 = new HashMap();
map2.put("clientName", "bb");
map2.put("certificateNo", "2222");
map2.put("certificateType", "01");
map2.put("personnelFlag", "1");
Map map3 = new HashMap();
map3.put("clientName", "测试");
map3.put("certificateNo", "1111");
map3.put("certificateType", "01");
map3.put("personnelFlag", "1");
allClientInfoList.add(map1);
allClientInfoList.add(map2);
allClientInfoList.add(map3);
System.out.println("before:" + JsonUtils.toJSONString(allClientInfoList));
Set> set = new HashSet>();
for (Map map : allClientInfoList) {
set.add(map);
}
System.out.println("set :" + JsonUtils.toJSONString(set));
System.out.println("after:" + JsonUtils.toJSONString(allClientInfoList));
}