mybatis foreach多次遍历问题:Error evaluating expression ‘’. Return value () was not iterable

报错: com.bdos.base.web.module.market.controller.MarketController.deleteComment(MarketController.java:203) MSG: XXXX
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression ‘ids’. Return value (2) was not iterable

出现这种错误:
Error evaluating expression ‘’’’. Return value () was not iterable

原因: mapper.xml文件中遍历List 时,该参数的实际值为非List数据。请仔细检查传入mybatis的参数类型。

你可能感兴趣的:(异常)