Question Description
使用JAVA语言的若依框架的时候,发现只要使用了startPage()函数, 并不需要前端传递分页的数据,也不需要注解,就能完成分页功能。预判他应该是使用类似拦截器的机制,但还是感觉很神奇,感觉知道个大概不过瘾,还是要更细致的了解才能满足,就想研究一下并记录下来。- /**
- * 查询test用户管理列表
- */
- @RequiresPermissions("user:manage:list")
- @PostMapping("/list")
- @ResponseBody
- public TableDataInfo list(TUser tUser)
- {
- startPage();
- // 获取 t_table1 表数据
- List<T_table1> list = T_table1Service.selectT_table1List(new T_table1());
- return getDataTable(list);
- }
复制代码 [code]开启 startPage()函数17:43:42.395 [http-nio-80-exec-26] DEBUG c.r.k.m.T.selectTProductList - [debug,137] - ==> Preparing: select * from t_table1 LIMIT ?17:43:42.396 [http-nio-80-exec-26] DEBUG c.r.k.m.T.selectTProductList - [debug,137] - ==> Parameters: 10(Integer)17:43:42.429 [http-nio-80-exec-26] DEBUG c.r.k.m.T.selectTProductList - [debug,137] - Preparing: select * from t_table117:53:13.357 [http-nio-80-exec-12] DEBUG c.r.k.m.T.selectTProductList - [debug,137] - ==> Parameters: 17:53:13.371 [http-nio-80-exec-12] DEBUG c.r.k.m.T.selectTProductList - [debug,137] - |