解决方法:添加名称为getByIds的SQL映射;
<select id="getByIds" resultMap="addressbookResult"> SELECT <include refid="commonColumns" /> FROM addressbook WHERE ID IN <foreach collection="list" item="ids" open="(" separator="," close=")"> #{ids} </foreach> </select>
Mapped Statements collection does not contain value for Addressbook.getByIds
原文地址:http://blog.csdn.net/testcs_dn/article/details/42393923