Mybatis分页插件,配置简单,比PageHelper更简单易用

Mybatis分页插件,配置简单,比PageHelper更简单易用

pom.xml


     com.github.erhun
     mybatis-page-plugin
     1.0.0

spring-application.xml

		
		
			
				classpath*:com/flurry/pageplugin/test/*DAO.xml
			
		
		
			
				
					
						
							default.page.size=11
							dialect=mysql
						
					
				
			
		
	
调用代码
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("conf/spring-application.xml");

Map params = new HashMap <> ();
params.put("code", "test");
params.put("pageNo", 1);
params.put("pageSize", 3);

TestDAO testDAO = applicationContext.getBean(TestDAO.class);

PageResult pageResult = testDAO.queryByPage(params);

System.out.println(pageResult.getMaxRecords());

项目地址

项目地址 https://github.com/erhun/mybatis-page-plugin

你可能感兴趣的:(Mybatis分页插件,java分页插件,开源项目)