解决:Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'

报错

Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.ExceptionInInitializerError]

问题描述

在写测试方法的时候 ,发现 bookLambdaQueryWrapper.like(name != null, Book::getName , name); 这一句老是报错

解决方法

更换MyBatis-Plus 依赖版本即可 , 之前我的是 3.4.3版本的 ,更换到 3.4.1 即可解决问题

posted @ 2024-05-06 10:51  捞月亮的小北  阅读(147)  评论(0编辑  收藏  举报