Cut the list value according to the specified length

88. Cut the list value according to the specified length

Rely on, Google's open source tool library, very powerful

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>29.0-jre</version>
</dependency>

One of the split list

//dataList 里面装了非常多的数据
List<Map<String, Object>>dataList ;
List<List<Map<String, Object>>> mgList = Lists.partition(dataList, 100000);
//遍历mgList,对数据进行多线程或者分批处理

Guess you like

Origin blog.csdn.net/weixin_43987718/article/details/132193597