List<>集合对象去重
List<ExamSubjects> unique = strings.stream().collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ExamSubjects::getId))), ArrayList::new)
);
List<ExamSubjects> unique = strings.stream().collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ExamSubjects::getId))), ArrayList::new)
);