欢迎光临
感谢一路有你

ssm框架中使用pagehelper分页

如果你对该文章中的内容有疑问/不解,可以点击此处链接提问
要注明问题和此文章链接地址 点击此处跳转
 

pom.xml中引入


<code class=""> &lt;dependency>
      &lt;groupId>com.github.pagehelper&lt;/groupId>
      &lt;artifactId>pagehelper&lt;/artifactId>
      &lt;version>5.1.2&lt;/version>
    &lt;/dependency>
</code>

在applicationContext.xml中加入


<code class="">&lt;property name=&quot;plugins&quot;>
            &lt;array>
                &lt;bean class=&quot;com.github.pagehelper.PageInterceptor&quot;>
                    &lt;property name=&quot;properties&quot;>
                        &lt;!--使用下面的方式配置参数,一行配置一个 -->
                        &lt;value>
                            helperDialect=mysql
                            offsetAsPageNum=true
                            rowBoundsWithCount=true
                            pageSizeZero=true
                            reasonable=true
                        &lt;/value>
                    &lt;/property>
                &lt;/bean>
            &lt;/array>
        &lt;/property>
</code>

service中使用

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

controller 中使用

页面的调用

赞(1) 打赏
未经允许不得转载:王明昌博客 » ssm框架中使用pagehelper分页
分享到: 更多 (0)

相关推荐

  • 暂无文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

×
订阅图标按钮