list根据某字段去重

questionnaireRiskEOList = questionnaireRiskEOList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(QuestionnaireRiskEO :: getQuestionnaireCode))), ArrayList::new));
https://blog.csdn.net/gsls200808/article/details/86501905



talk is cheap. show me the code.
原文地址:https://www.cnblogs.com/yushizhang/p/13387747.html