错误日志(.BadSqlGrammarException:错误的sql参数异常,参数对应没问题,错误其实在字段名)
org.springframework.jdbc.BadSqlGrammarException:
Error querying 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 where username=‘T_0001’’ at line 1
order是关键词不能直接当成字段名
解决方法
在字段名上加上 号