问题描述:
mybatis-plus 3.4.3项目本地应用jdk 15,本地开发、测试都没有问题,上服务器时,服务器配置jdk16,导致大量接口报如下错误:
c.g.l.web.advice.CustomControllerAdvice : 发生Exception错误 错误代码:null 错误信息:nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NoClassDefFoundError: Could not initialize class com.baomidou.mybatisplus.core.toolkit.support.SerializedLambdaMeta]
查找了好多方式,没有找到方法,然后在gitee上逛mybatiplus社区的时候,发现了问题。
lambda-jdk16问题
两种解决方式:
- mybatis-plus降低3.4.2(没有尝试,因为要改的东西太多)
- jdk环境降到15及以下。
亲测,问题解决,记录一下。