spring.boot mybaits集成

时间:2022-02-15 20:58:50
https://www.cnblogs.com/pejsidney/p/9272562.html (insertBatch批量插入)
第一篇博客循环部分有错误,参照下面的例子去更改
List<String> list=new ArrayList<String>();
list.add("");
list.add("");
list.add("");
list.add("");
list.add("");
list.add("");
list.add("");
int batchCount=;
int batchLastIndex=batchCount;
for(int index=;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 特别完整版