- 需要求该配置文件
user=root
password=root
url=jdbc:mysql://localhost:3306/stu?rewriteBatchStatements=true
driver=com.mysql.jdbc.Driver
- 批处理代码
// 详细代码见此链接。https://blog.csdn.net/weixin_37627774/article/details/107505653
public class BatchInsertTest {
public final int maxIn = 20000;
// addBatch,executeBatch,clearBatch.