public static void batchInsert(List<Integer> ints,int count ) { int begin =0; int end = begin+count ; while (begin<=ints.size()-1){ List<Integer> integers = ints.subList(begin, end<=ints.size()?end:ints.size()); //插入数据 System.out.println(integers); begin = end; end = begin+count ; } }