簡單說一下 問題
1.pom中pagehelper的依賴
<!-- springboot分頁插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.3</version> </dependency>
2.分頁的調用 位置也沒有錯 PageHelper.startPage(page, pageSize);
3:數據只有一條 page =1 pageSize =10 出來一條數據 page =2 pageSize = 10還能出來一條數據
4:頓時慌了。。。。。 趕緊度娘
5:https://blog.csdn.net/u011342403/article/details/79504809 再次博文中發現 靈感
6:具體原因 pagehelper-spring-boot-starter自帶了許多默認的配置,所以不需要我們配置任何屬性
7:在pagehelper-spring-boot-starter的github的issue中找到了這樣的回答
https://github.com/pagehelper/pagehelper-spring-boot/issues/21
8:去掉yml中的pageHelper配置 在測試成功
成功。。。。 插件太智能也不好 把人搞得沒有存在感。。。。