摘要:
数据量考虑为万级别 Mybatis batch模式 mybatis 默认的处理方式是Simple,需要手动开启Batch模式,将sql发送至数据库缓存区,一次性执行多条语句。 1.1:创建工具类 //工具类 @Component public class MybatisBatchUtils { pr 阅读全文
posted @ 2025-07-18 14:47
彡木
阅读(16)
评论(0)
推荐(0)
摘要:
本文采用手动提交的方式使用connection控制事务,所以适用于同一connection的情况下。 @Resource(name = "taskExecutor") Executor taskExecutor; //线程池 @Resource SqlSessionTemplate sqlSessi 阅读全文
posted @ 2025-07-18 13:34
彡木
阅读(15)
评论(0)
推荐(0)