ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

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

排查项目中依赖的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);}
}

启动时会打印所有拦截链


返回列表