1.封装分页Page类 1 package com.framework.common.page.impl; 2 3 import java.io.Serializable; 4 5 import com.framework.common.page.IPage; 6 /** 7 ...
1.封装分页Page类
1 package com.framework.common.page.impl; 2 3 import java.util.List; 4 /** 5 * 6 * 7 * 8 */ 9 public class Page extends BasePage {10 11 /**12 * 13 */14 private static final long serialVersionUID = -970177928709377315L;15 16 public static ThreadLocal<Page> threadLocal = new ThreadLocal<Page>();17 18 private List<?> data; 19 20 public Page() {21 }22 23 public Page(int currentPage, int pageSize, int totalCount) {24 super(currentPage, pageSize, totalCount);25 }26 27 public Page(int currentPage, int pageSize, int totalCount, List<?> data) {28 super(currentPage, pageSize, totalCount);29 this.data = data;30 }31 32 public List<?> getData() {33 return data;34 }35 36 public void setData(List<?> data) {37 this.data = data;38 }39 40 41 }
2.封装分页插件
1 <?4.分页**
1 <!-- =================================================================== 2 - Load property file 3 - =================================================================== --> 4 <context:property-placeholder location="classpath:application.properties" /> 5 6 <bean id="sqlSessionFactory" > 7 <property name="dataSource" ref="dataSource" /> 8 <property name="configLocation" value="classpath:mybatis-config.6.SpringMVC配置**
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:SpringMVC+MyBatis分页插件简单实现
关键词:Spring
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。