ERROR 1064 (42000): 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 xxx
錯誤原因爲使用了mysql關鍵字
在sql語句中使用``
將表名列名引起來
如:select `desc` from `key` t1 where t1.`id` = 1
當使用了mybatis-plus時,使用了關鍵字作爲表的列名,注意在實體類中加上@TableField
註解並指定對應列名
@TableField(value="desc")
private String desc;