Q:在使用MyBatis Plus
作数据分页的过程中,发现返回的page中的属性total为0,但是data里有数据。
A:原因是在项目依赖里加了一个新的分页插件pagehelper
,这个插件会干扰MP分页,删掉即可。
<!--删掉这个:pagehelper分页插件-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.0.0</version>
</dependency>
版权属于:。。。源
本文链接:https://www.findmyfun.cn/the-total-of-mybatis-plus-paging-is-0.html
转载时须注明出处及本声明
感谢分享,原来是这个插件在捣鬼,感谢博主!