mybatis中in方法的使用

传递参数必须是数组或者list,传递的如果是字符串会报错(使用foreach进行遍历)

(<foreach item="temp" index="index" collection="defaultGroup" separator=",">
#{temp}
</foreach>)

其中“defaultGroup”为传递的变量

原文地址:https://www.cnblogs.com/csgbpd/p/12512367.html