Location:Home >> News >> develop

若依3.6.0使用Mybatis-plus分页失效以及完美替换Pagehelper

删Pagehelper和Mybatis的依赖,然后一点点的改若依一些基本配置的分页就好,最后在加上Mybatis-plus的分页插件配置!最最重要的是要扫描到写的分页插件,不然不生效!

小编最近在经历后端框架的迁移,虽然不是小编来做,但是有个分页的情况让小编和一个同事去搞。说一下小编这边的需求:原来框架使用Mybatis-plus进行分页,要更换的新框架若依是使用Pagehelper。所以现在需求让我们把若依的干掉,使用Mybatis-plus,Mybatis-plus的生态还是挺好的,方便,最重要的是和原来的框架一样,不需要更改。存在问题:需要把若依以前的分页全部改成Mybatis-plus的分页,那我们就按个换喽,谁让咱们喜欢搬砖!

先说一下问题出现的原因:Mybatis和Mybatis-plus存在冲突,Pagehelper依赖于Mybatis,所以冲突了!!

解决方案:删Pagehelper和Mybatis的依赖,然后一点点的改若依一些基本配置的分页就好,最后在加上Mybatis-plus的分页插件配置!最最重要的是要扫描到写的分页插件,不然不生效!

Special Reminder & Disclaimer:
The information of this website comes from the Internet. The content (pictures, videos and words) released by this website is mainly the content submitted by users and reproduced by users. The purpose is to convey more information, which does not mean that this website agrees with its views. The originality, statements, and content of this article have not been verified by this website. We do not guarantee or promise the authenticity, completeness, or timeliness of this article or all or part of its content or text. Please verify the relevant content on your own. This website does not assume direct or joint liability for infringement of such works. If any content on this website infringes on your rights, please contact us promptly (email: nssa@soufind.com )This site will complete the processing within 72 hours. The original content on this website cannot be reproduced without permission, or the source must be indicated when reprinting: nssa.vip Aerospace Alliance

Author:

Recommended for you

Post comments

admin

Contact Us

Contact Us

Online consultation: QQ交谈

Email: service#soufind.com

follow us on WeChat
Scan and follow us on WeChat

Scan and follow us on WeChat