我对 MySql 数据库的 Rest 调用有问题。
我使用 JS 对象并通过使用 java 后端的 rest get 调用发送它。
requestParams: {
pageStart: 0,
results: 10
}
我已经为此请求配置了查询
"get-users" : "SELECT * FROM ${_dbSchema}.${_table} LIMIT ${pageStart}, ${results}"
但是 queryParams 在后端转换为字符串,在响应时我收到此错误
{"error":500,"reason":"Internal Server Error","message":"DB reported failure executing query SELECT * FROM shema.user LIMIT ?, ? with params: {results=10, pageStart=0} error code: 1064 sqlstate: 42000 message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0', '10'' at line 1"}
我可以在 sql-query 中解决这个问题吗?