前言 略 Collectors.toList List<User> userList = ...; List<Long> userIdList = userList.stream().map(User::getUserId).collect(Collectors.toList());