在使用Mybatis写sql语句的过程中,报了MyBatis:Parameter Maps collection does not contain value for xxx.xxx 的错误。解决方式是检测XXMapper.xml文件中的标签中的parameterType是否写成了parameterMap.
查看Mybatis官方资料:
SQL映射的XML文件:parameterMap 已经废弃了,现在使用parameterType来处理。
注意:如果任意Mapper.xml文件的mybatis标签中使用了parameterMap,将影响所有的sql语句的执行,所有的sql语句执行都会报这个错误。