由於close是mysql關鍵字java
2019-11-07 21:33:33,963 DEBUG (BaseJdbcLogger.java:159)- ==> Preparing: select 'true' as QUERYID, id, posid, userid, account_id, contract, open, close, size, deal_size, limitt, stop, status, ctime, utime, direction, type, stop_mode, trailing_step, price_level, cancel_date, fee_buy, fee_sell, routing_status, settle_asset from exproto_contract_position order by id DESC limit 0, 15 2019-11-07 21:33:33,968 INFO (XmlBeanDefinitionReader.java:316)- Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] 2019-11-07 21:33:34,002 ERROR (CommonUtils.java:182)- msg:runtimeExceptionHandler: org.springframework.jdbc.UncategorizedSQLException: ### Error querying database. Cause: java.sql.SQLException: sql injection violation, syntax error: ERROR. pos 98, line 5, column 52, token CLOSE : select 'true' as QUERYID, id, posid, userid, account_id, contract, open, close, size, deal_size, limitt, stop, status, ctime, utime, direction, type, stop_mode, trailing_step, price_level, cancel_date, fee_buy, fee_sell, routing_status, settle_asset from exproto_contract_position order by id DESC limit 0, 15 ### The error may exist in file [D:\oy\new_gitRepository\exchangeapi\jweb-dao\target\classes\amberai\jweb\mapping\ContractPositionMapper.xml] ### The error may involve amberai.jweb.dao.ContractPositionDao.selectByExample ### The error occurred while executing a query
參考:https://blog.csdn.net/duantianya2012/article/details/54571386mysql