根据文件名的上一级目录分组,key是父级目录名称
Map<String,List<Path>> pathMap = exceptionReport.stream()
.map(item -> Paths.get(item.getParamValue()))
.collect(Collectors.groupingBy(item -> item.getParent().getFileName().toString(),Collectors.toList()));
Map<String,List<Path>> pathMap = exceptionReport.stream()
.map(item -> Paths.get(item.getParamValue()))
.collect(Collectors.groupingBy(item -> item.getParent().getFileName().toString(),Collectors.toList()));