mysql報錯:Cause: java.sql.SQLException: sql injection violation, syntax error: ERROR. pos 39, line 2, column 24, token CLOSE


 

因為close是mysql關鍵字

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

 

參考:https://blog.csdn.net/duantianya2012/article/details/54571386


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM