1、将一个集合中某个元素弄成一个集合
List<> attachments = new ArrayList<>();
List attachementName = articleModel.setAttachmentName(attachments.stream().map(attachment -> attachment.getName()).collect(Collectors.toList()));
1、将一个集合中某个元素弄成一个集合
List<> attachments = new ArrayList<>();
List attachementName = articleModel.setAttachmentName(attachments.stream().map(attachment -> attachment.getName()).collect(Collectors.toList()));