使用MyBatis批量插入数据,MyBatis拦截器失效?-灵析社区

感觉对了

找到原因了,在@Intercepts注解添加要拦截的StatementHandler方法即可 @Intercepts({ @Signature(type = Executor.class,method = "update",args = {MappedStatement.class, Object.class}), @Signature(type = StatementHandler.class,method = "update",args = {Statement.class}) }) public class MyBatisAutoFillPlugin implements Interceptor { // some code... }

阅读量:1

点赞量:0

问AI