array(2) { ["docs"]=> array(0) { } ["count"]=> int(0) } 111string(0) "" int(1) int(10) int(70) int(8640000) array(2) { ["docs"]=> array(0) { } ["count"]=> int(0) } 记一下mybatis中foreach循环遇到的一个小问题 - 爱码网

---恢复内容开始---

我在添加单条数据的时候,参数是一个map,没有使用循环,直接map.字段,即使这个字段map中并不存在,也不会出错

但是是一个List<Map>这种,保存就需要循环遍历这个list,然后每个元素都是个map,这时候如果map取一个没有的字段就会报错,就是这个错误:

1 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter '__frch_map_0' not found. Available parameters are [list]

 

 

---恢复内容结束---

相关文章: