首页 > 其他分享 >Error evaluating expression ‘xxxxx != null and xxxxxx!= ”’. Cause: org.apache.ibatis.ognl.OgnlExcept

Error evaluating expression ‘xxxxx != null and xxxxxx!= ”’. Cause: org.apache.ibatis.ognl.OgnlExcept

时间:2022-11-11 15:24:36浏览次数:46  
标签:category getProperty ibatis evaluating ognl null Cause id

错误描述:
SQL语句中出现
Error evaluating expression ‘category.id != null and category.id != ”’. Cause: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, “id”)

错误原因:
异常实际是在Mybatils执行映射处理的时候发生的,属性“XXX”找不到调用自己的所有者对象(NULL),所以抛出异常

解决方式:
在对应的XXXMapper.xml中一步步判断字段(属性)所有者是否为空
从最初的字段所有者开始判断(先要判断category不能为空),避免空指针,才能继续下面的判断
这里写图片描述

标签:category,getProperty,ibatis,evaluating,ognl,null,Cause,id
From: https://www.cnblogs.com/LLW521/p/16880535.html

相关文章