ssm框架中使用pagehelper分页

pom.xml中引入

 
      com.github.pagehelper
      pagehelper
      5.1.2
    

在applicationContext.xml中加入


            
                
                    
                        
                        
                            helperDialect=mysql
                            offsetAsPageNum=true
                            rowBoundsWithCount=true
                            pageSizeZero=true
                            reasonable=true
                        
                    
                
            
        

service中使用

service的实现类中使用
PageHelper.startPage(page,size);

controller 中使用

页面的调用

本文由博客一文多发平台 OpenWrite 发布!

你可能感兴趣的:(ssm框架中使用pagehelper分页)