https://www.cnblogs.com/pejsidney/p/9272562.html (insertBatch批量插入) 第一篇博客循环部分有错误,参照下面的例子去更改 List<String> list=new ArrayList<String>(); list.add("1"); list.add("2"); list.add("3"); list.add("4"); list.add("5"); list.add("6"); list.add("7"); int batchCount=3; int batchLastIndex=batchCount; for(int index=0;index<list.size();){ List<String> subs; if(batchLastIndex>list.size()){ batchLastIndex=list.size(); subs= list.subList(index, batchLastIndex); }else{ subs = list.subList(index, batchLastIndex); index = batchLastIndex; batchLastIndex = batchLastIndex + batchCount; //这一行改造原来是batchLastIndex = batchLastIndex + batchCount-1 } } https://blog.csdn.net/qq_33337504/article/details/78460383 (select * from ) https://blog.csdn.net/qq_36367789/article/details/79732868 特别完整版