Mybatis The error may involve defaultParameterMap ### The error occurred while setting parameters

拼搏现实的明天。 2023-06-12 08:44 125阅读 0赞

因为参数为空导致“<“foreach collection=“ids” item=“id” separator=”,”> ” 执行失败

The error may involve defaultParameterMap

The error occurred while setting parameters

今天项目运行中这个错误:

因为我传入的参数ids是一个list集合,当list集合为null或者长度为0时,就会出现这样的执行错误;
通过CollectionUtils.isNotEmpty(ids)是否为空,再执行代码;

发表评论

表情:
评论列表 (有 0 条评论,125人围观)

还没有评论,来说两句吧...

相关阅读