问题:
Cause: java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 1);
Error querying database. Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping:
解决办法:
在xml中自定义sql语句时,里面不能有注释过得sql,简单的说就是:假如第一次写的sql是select * from table,但是在后面发现要写错了,那么只能把之前这一条删除掉,不能注释,如果注释就会报错。
参考自:(https://www.cnblogs.com/exce-ben/p/13306807.html)