check the manual that corresponds to your MySQL server version for the right syntax to use near 'log(id,content,createTime) values(null,'?”¨??·??????admin????”

严重: Servlet.service() for servlet [DispatcherServlet] in context with path [/OnlineShop] threw exception [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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' at line 1
### The error may involve com.ischoolbar.programmer.dao.admin.LogDao.add-Inline
### The error occurred while setting parameters
### SQL: insert into log(id,content,createTime) values(null,?,?)
### 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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' 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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' at line 1] with root 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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' at line 1

 

 

严重: Servlet.service() for servlet [DispatcherServlet] in context with path [/OnlineShop] threw exception [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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' at line 1
### The error may involve com.ischoolbar.programmer.dao.admin.LogDao.add-Inline
### The error occurred while setting parameters
### SQL: insert into log(id,content,createTime) values(null,?,?)
### 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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' 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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' at line 1] with root 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 'log(id,content,createTime) values(null,'?”¨??·??????admin????”¨??·???????—?è?“?…' at line 1
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
View Code

 

 将所有的Log改成Logs 即可,好像是因为Log是个关键字之类的

 

 

 

posted @ 2020-10-06 10:44  叶月廿柒  阅读(279)  评论(0编辑  收藏  举报