报错原因springboot运行报错Caused by: java.sql.SQLException: Parameter index out of
range (2 > number of parameters, which is 1).
对比一下下面两种写法
因为加了注释,而注释不小心放在了标签里,就会导致报错,解决办法就是把注释移到标签外,即第一种注释方法,报错得以解决。

报错原因springboot运行报错Caused by: java.sql.SQLException: Parameter index out of
range (2 > number of parameters, which is 1).
对比一下下面两种写法
因为加了注释,而注释不小心放在了标签里,就会导致报错,解决办法就是把注释移到标签外,即第一种注释方法,报错得以解决。