java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 1) 解决方法
1. 今天在mybatis的xml语句中加了一句注释导致异常报错
(java.sql.SQLException: Parameter index out of range (2 > number of parameters, which is 1).)
2.究其原因,发现是因为刚刚新加了语句,但是未删掉原语句,用了注释
注意xml里的sql的字符串使用的是''(单引号括起来,双引号会报错)