MyBatis The expression ‘xxx‘ evaluated to a null value问题解决
问题描述:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: The expression 'userIdList' evaluated to a null value.
问题分析:
1、使用foreach标签时,循环对象userIdList为null,导致报错。
t1.user_id = #{userId}
解决办法:
使用foreach之前先判断循环对象是否不为空并且大小大于0。
t1.user_id = #{userId}
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
