报错信息


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 8' at line 4
; 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 'LIMIT 8' at line 4] with root cause

原因是mapper层写sql语句时结尾加了 “;”,我笑了(口吐芬芳)…

去掉结尾的分号就好了