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