本文介绍: Cause: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, “tenderCode“)
正式与测试代码一样,但是测试上没有报错,正常查询,正式上查询方法报错
报错如下:
500,nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression ‘params.tenderCode!=null and params.tenderCode!=’‘’. Cause: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, “tenderCode”)
代码:
DAO:
List selectGdContractInfoList(Param(“params”) Map<String,Object> params);
通过排查代码,通过断点,数据传入DAO时还有值,走mapper就报错,发现’params 为空,最后更改成如下:问题解决
List selectGdContractInfoList(@org.apache.ibatis.annotations.Param(“params”) Map<String,Object> params);
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。