java.lang.NullPointerException: target is null for method size

<if test="productId.size() > 0">
    and b.specification_id IN
    <foreach collection="productId" item="specId">
      #{specId}
    </foreach>
</if>
<if test="uid.size() > 0">
    and b.uid IN
    <foreach collection="uid" item="userId">
        #{userId}
    </foreach>
</if>

目标为方法大小的null:总体来说,是在xml文件中使用了错误的方法,uid.size() 不能被用在xml中。


猜你喜欢

转载自blog.csdn.net/qq_34638435/article/details/80941010
今日推荐