Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: 
### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'order (id, price, createdate, 
      ostatus, dnum, content, 
      phone, rid)
' at line 1
### The error may involve com.fasteat.server.dao.OrderMapper.insert-Inline
### The error occurred while setting parameters
### SQL: insert into order (id, price, createdate,        ostatus, dnum, content,        phone, rid)     values (?, ?, ?,        ?, ?, ?,        ?, ?)
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'order (id, price, createdate, 
      ostatus, dnum, content, 
      phone, rid)
' at line 1
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'order (id, price, createdate, 
      ostatus, dnum, content, 
      phone, rid)
' at line 1
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

查看问题关键 Order 位置出现错误 ,突然想起来了 这不是mysql的保留字吗   解决方法 将order 修改成 `order`  Tab键上面的符号问题就解决了


你可能感兴趣的:(异常,日常bug)