解决方法:Parameter ‘xxx‘ not found. Available parameters are [xxx,xxx, param3, param1,param2]

发布时间 2023-04-24 14:36:02作者: 娶个好听的名字

出现这个问题是因为Mybatis识别不了你的参数列表,所以才报这个错,如下:

1 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found. Available parameters are [0, 1, param1, param2]

解决过程如下:
对于mapper接口中,传入的参数有多个时必须使用@param进行标识,见下图:

 只要对多个参数使用@Param进行标识即可解决问题