- ### The error may involve com.example.bootjdbc220620.mapper.CityMapper.insert-Inline
- ### The error occurred while setting parameters
- ### SQL: INSERT into city('name','state','country') values(?,?,?)
- ### 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 ''name','state','country') values('jack','actived','uk')' at line 1
- ; bad SQL grammar []; nested exception is 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 ''name','state','country') values('jack','actived','uk')' at line 1] with root 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 ''name','state','country') values('jack','actived','uk')' at line 1
- at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.29.jar:8.0.29]
复制代码 是因为mapper中的inser语句中字段的引号问题导致。

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |