Java List—— 转换集合List

Iterable To List
List<ReceiverMiner> receiverMiners = new LinkedList<>();
Iterable<ReceiverMiner> receiverMinerIterable = receiverMinerRepository.findAll();
receiverMinerIterable.forEach(receiverMiners::add);

return receiverMiners;

 

posted @ 2021-06-01 13:52  话·醉月  阅读(355)  评论(0编辑  收藏  举报