博客来源:
编写项目的时候,明明是自动生成的代码程序,调用的时候出现SQL问题,问题如下
org.springframework.jdbc.BadSqlGrammarException:
### Error querying 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 'limit, LeaveNum
通过寻找问题来源发现,定义数据库的时候,名称起的过于随意 导致的问题
起名字 的时候,导致占用了关键字,对于关键字的话谁也无能为力啊,只能更改数据库中的属性,重新进行生成代码