Java中stream的使用String集合转Long类型后,需要boxed,再转集合12345List<Long> dictValues = sysDictDatas.stream() .map(SysDictData::getDictValue) .mapToLong(Long::parseLong) .boxed() # 将 LongStream 转换为 Stream<Long> .collect(Collectors.toList()); 百度