文件管理和分页limit;
分页管理的所需配置文件pom。xml里面的:
<!-- 分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>5.0.0</version> </dependency>
web.xml中的:
<!-- 配置分页插件 --> <plugins> <plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin> </plugins>
控制层:
@ResponseBody @GetMapping("/all") public PageInfo<List> selectAllBook(PageVo pageVo){ PageHelper.startPage(pageVo.getPageNum(),pageVo.getPageSize()); List books = bookSerivce.selectAllBook(); PageInfo<List> bookPageInfo = new PageInfo<List>(books); return bookPageInfo; }