org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found. Available parameters are [ew, page, param1, param2]
QueryWrapper<LearningExaminationQuestions> questionWrapper = new QueryWrapper<>();
questionWrapper.lambda()
.in(LearningExaminationQuestions::getId,questionsId)
.eq(LearningExaminationQuestions::getIsDeleted,0)
.eq(LearningExaminationQuestions::getStatus,1);
return page(page,questionWrapper);这段代码一直报上边的异常
出现这个问题除了网上很容易搜索到的参数不匹配,少@param注解等原因之外,还有极少情况也会出现这种情况.
检查自己Mapper文件是否重写了selectPage()方法,导致page()方法并没有走框架代码
解决这个问题也很简单,把自己写的selectPage()方法改名即可
当遇到org.mybatis.spring.MyBatisSystemException,nestedexception是org.apache.ibatis.binding.BindingException,提示参数未找到时,除了常见的参数不匹配或缺少@Param注解的原因,还可能是自定义了selectPage方法导致。解决方案是检查并重命名自定义的selectPage方法。

760

被折叠的 条评论
为什么被折叠?



