木心

毕竟几人真得鹿,不知终日梦为鱼

导航

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

posted on 2019-11-08 09:47  wenbin_ouyang  阅读(9434)  评论(0编辑  收藏  举报