报错情况如下org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘stocksList’ not found. Available parameters are [stockList, param]
这句话的大概意思是你找不到你传进来的参数
在这里插入图片描述后来我发现是我collection里定义的参数“stocksList”没找到,最后发现只要把
mapper.java文件中方法参数从在这里插入图片描述加@Param(“stocksList”)修改为
在这里插入图片描述就行了,最后总结一下@Param中的参数应该要与Collection属性参数相同

Logo

一站式 AI 云服务平台

更多推荐