zoukankan      html  css  js  c++  java
  • 空指针和SQL语法错误org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that

    下单的时候报错,空指针和SQL语法错误等,后来发现SQL语句写错好几处,多了”  ,;  (  “      少了”  =  “  时有发生

     排查错误时发现不能把参数返回给rows

    控制台报错SQL语法

    org.springframework.jdbc.BadSqlGrammarException: 
    ### Error updating database.  Cause: java.sql.SQLSyntaxErrorException: 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 ')' at line 5
    ### 

    查看VideoOrderMapper.xml果然语法还有错误,去掉逗号和分号

    更改SQL语句后rows已经有值了

    下单成功

     

    查看数据库,用户下单成功

     

  • 相关阅读:
    钟国晨160809323(作业5)
    12
    11
    第九次
    8作业
    第七次作业
    6
    林昊5
    计算机网络原理与应用笔记 3/29
    计算机网络原理与应用笔记 3/22
  • 原文地址:https://www.cnblogs.com/ooo888ooo/p/13214020.html
Copyright © 2011-2022 走看看