ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

排查项目中依赖的mybatis 拦截器

2026/8/4 4:03:02 拓冰建站 浏览量
排查项目中依赖的mybatis 拦截器

今天出了一个问题,明明 romoveByIds in IdList 入参是正确的,最后的日志却是  update  xxx  where  id in (?)   paramater null
参数被替换成了null

故需要排查项目中注入了哪些MybatisIntercepter

@Autowired
private List<MybatisPlusInterceptor> interceptors;@PostConstruct
public void logInterceptors() {for (MybatisPlusInterceptor interceptor : interceptors) {// 反射或者通过打断点看其内部的 innerInterceptors 列表System.out.println("当前拦截器链: " + interceptor);}
}

启动时会打印所有拦截链