通过Java8中stream流实现 List<String> nameList = userList.stream().map(User::getName).collect(Collectors.toList());