运行项目时出现如下错误:
java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
排查后,发现错误原因时SQL语句错误。
因为使用的是泛查询,正确写法应该是:
select xxx
from xxx
where xxx like '%${xxx}%';
运行项目时出现如下错误:
java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
排查后,发现错误原因时SQL语句错误。
因为使用的是泛查询,正确写法应该是:
select xxx
from xxx
where xxx like '%${xxx}%';