springboot的api在做分页时出错

提问 3 1187
版本:renren-security 开发环境:
img[//cdn.renren.io/7fd18201903231539287684.PNG] totalsize和totalpage报0
回帖
  • [pre] @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } [/pre] 配置一下分页插件
    0 回复
  • 淘无峰
    2019-03-23
    你好,我在pageutilsde1分页实体工具类中加入了你刚才的这个,还是没解决,还有一个工具类query,这个里面出现的就是上图显示成功的pagesize和currpage,所以我想问下应该在这两个类中的哪个类中去改
    0 回复
  • @淘无峰 应该是配置错了吧 [pre] @Configuration public class MybatisPlusConfig { @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } } [/pre] 全部的代码是这样的,类上需要加@Configuration注解
    0 回复