public List<Map<Long, String>> getIdNameMapList() {
return superManager.list().stream().map(item -> Map.of(item.getId(), item.getName())).collect(Collectors.toList());
}
用到了Map.of()
public List<Map<Long, String>> getIdNameMapList() {
return superManager.list().stream().map(item -> Map.of(item.getId(), item.getName())).collect(Collectors.toList());
}
用到了Map.of()