mybatis异常 bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorE

这个错误是自己开发过程中不细心导致的,特记下来,作为警惕。

; bad SQL grammar []; nested exception is 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 ''1'' at line 14

mysql分页 limit中需要整数,结果自己 dao层写成了String 类型,(低级错误)

dao层: public List queryPastLimit(@Param("issuenumber")String issuenumber,@Param("lotterytype")String lotterytype,@Param("pageSize") String pageSize);

正确写法为 :public List queryPastLimit(@Param("issuenumber")String issuenumber,@Param("lotterytype")String lotterytype,@Param("pageSize") int pageSize);

你可能感兴趣的:(mybayis)