pagehelper和springboot混合使用
程序员文章站
2022-05-31 19:59:28
...
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.3.0</version>
</dependency>
pagehelper:
helper-dialect: mysql
reasonable: true
support-methods-arguments: true
params: count=countsql
@RequestMapping("/test3")
public String test3(){
PageHelper.startPage(1,10);
PageInfo<TestVo> pageInfo = new PageInfo<>(testMapper.selectAll());
System.out.println(pageInfo.getList());
System.out.println(pageInfo.getTotal());
return pageInfo.getList().toString();
}
上一篇: 虚拟机-Ubuntu-18.04-docker-CTFd-内网ip
下一篇: Gitlab安装
推荐阅读
-
混合语言编程—C#使用原生的Directx和OpenGL绘图的方法
-
Mybatis分页插件PageHelper的配置和简单使用方法(推荐)
-
SQL语句中OR和AND的混合使用的小技巧
-
springboot使用Mybatis(xml和注解)过程全解析
-
AI怎么使用旋转和替换混合选项绘制图形?
-
SQL语句中OR和AND的混合使用的小技巧
-
nginx和swoole怎么混合使用
-
使用SpringBoot和SpringSecurity实现 JWT 认证与授权
-
混合开发使用Chrome Inspect调试WebView预览手机界面和定位元素
-
MySQL安装教程并使用springboot2和Mybatis测试