1、在使用foreach的是collection属性,该属性是必须指定的,但是在不同情况下,该属性的值是不一样的,主要有一下3种情况:
2、判断长度
集合:<if test="arr != null and arr.size() > 0">
数组:<if test="col != null and col .length > 0">
mybatis数组和集合的长度判断及插入
原文:https://www.cnblogs.com/jaxlove-it/p/9328291.html