同一块石头搬到了两次的List<Map> 转List<dto>的问题

不多比比
it is shame to talking about this

List<Map<String, Object>> maps = reader.readAll();
List<UploadData> collect = maps.stream().map(m -> new UploadData(m.get("name").toString(), m.get("card").toString(),
        m.get("phone").toString())).collect(Collectors.toList());
System.out.println(collect);

  看看lambda 吧   please  your majesty!!!!!!!!

posted on 2022-11-08 16:10  王半仙儿的博客  阅读(85)  评论(0编辑  收藏  举报

导航