将
spring.datasource.url=jdbc:mysql://localhost:3306/xx?autoReconnect=true&useUnicode=true
修改为
spring.datasource.url=jdbc:mysql://localhost:3306/xx?autoReconnect=true&useUnicode=true&rewriteBatchedStatements=true
增加rewriteBatchedStatements=true
修改前批量新增10000大概需要17秒
修改后批量新增10000大概需要1.3秒