PageHelper 分页
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; public PageInfo<A> queryList(@RequestBody A a) { PageHelper.startPage(a.getCurrentPage(),a.getPageSize());//设置分页参数, return new PageInfo<>(aService.getAll(a));//设置参数后需要直接执行查询 }
<configuration> <!-- 配置分页插件 --> <plugins> <plugin interceptor="com.github.pagehelper.PageHelper"> <!-- 设置数据库类型 Oracle,Mysql,MariaDB,SQLite,Hsqldb,PostgreSQL六种数据库--> <property name="dialect" value="mysql"/> </plugin> </plugins> </configuration>
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号