pagehelper使用报错

项目名:ssm_test
问题描述:使用pagehelper时,报错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 1'
解决:xxxmapper.xml文件中的查询语句多写了一个分号,删除即可
原因:因为PageHelper插件会在查询语句后拼接上limit,导致报错

<select id="getById" resultMap="goodsResultMap">
        select * from tbl_goods;limit 1,5;
    </select>
posted @ 2022-06-04 23:19  百度男神  阅读(191)  评论(0)    收藏  举报