fluent-validator icon indicating copy to clipboard operation
fluent-validator copied to clipboard

和mybatis-plus集成后报空指针

Open parkerisme opened this issue 4 years ago • 1 comments

版本:1.0.9 和mybatis-plus集成后,创建代理: @Bean public BeanNameAutoProxyCreator beanNameAutoProxyCreator(){ BeanNameAutoProxyCreator proxyCreator = new BeanNameAutoProxyCreator(); proxyCreator.setProxyTargetClass(true);//默认是false,不设置会导致controller 404 proxyCreator.setBeanNames("*ServiceImpl"); proxyCreator.setInterceptorNames("fluentValidateInterceptor"); return proxyCreator; } 请求报空指针,打断点跟代码发现: Method implMethod = ReflectionUtil.getMethod(targetClass, invocation.getMethod().getName(), parameterTypes); 无法获取接口中的默认方法,从而implMethod=null

parkerisme avatar Apr 27 '21 06:04 parkerisme

default T getById(Serializable id) { return getBaseMapper().selectById(id); }

parkerisme avatar Apr 27 '21 06:04 parkerisme