解决mybatis foreach 错误: Parameter '__frch_item_0' not found
在遍历对象的属性(是ArrayList对象)时报错:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter '__frch_item_0' not found. Available parameters are [1, 0, param1, param2]
在SQL语句中将#{} 改成 ${} 字符串类型然后加上引号 '${item.name}'
<foreach collection="eventConditionList" index="index" item="item" separator="or" open="(" close=")">
(b.name = '${item.name}' and b.value = '${item.value}')
</foreach>