kevinluoc
kevinluoc
我们确认拦截器是肯定可以拦截到association中配置SQL的,因为我们继承的是mybatis中的org.apache.ibatis.plugin.Interceptor,我们自己尝试重写mybatis-plus中的MybatisPlusInterceptor.java方法“ intercept(Invocation invocation)”,增加“if (target instanceof Executor) {”中对应的else分支,是可以解决的,具体如下所示: ``` @Override public Object intercept(Invocation invocation) throws Throwable { Object target = invocation.getTarget(); Object[] args = invocation.getArgs(); if (target instanceof Executor) { final...
> InnerInterceptor 各个method都有对应的场景,你这种乱用法是不合适的 谢谢,如果想要实现之前v3.2.0那种效果,需要如何实现比较合适,有没有什么建议?