mybatis报错
今天做一个更新功能时出现下面错误
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### 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 'where id = 12' at line 8
这种错误一般就是自己的sql语句多了个东西,检查一下删除就好了
仔细查看后,是因为sql语句最后多了逗号
就是这个逗号,去掉就可以了