Web Analytics

uni-page

⭐ 158 stars English by ethan-carter-g

🌐 Language

Uni-Page Pagination Framework

Uni-Page is a general-purpose pagination framework based on Java. Through abstracted design, it provides a unified pagination query interface for different data sources. The framework adopts a modular architecture and currently integrates multiple data sources such as JDBC, Mybatis, MongoDB, and Elasticsearch, offering a flexible extension mechanism.

Core Design

The core design of the framework revolves around four key components:

Design Objectives

Application Scenarios

Core Modules

uni-page

Core pagination library, providing basic pagination interfaces and abstract implementations.

uni-page-jdbc

JDBC data source support module, providing JDBC-based pagination implementation.

uni-page-jdbc-mybatis

MyBatis integration module, providing integration support with the MyBatis framework.

uni-page-mongodb

MongoDB data source support module, providing MongoDB-based pagination implementation.

uni-page-elasticsearch

Elasticsearch data source support module, providing ES-based pagination implementation.

spring-boot-starter-web-uni-page

Pagination support module for Spring MVC environments, providing integration support with Spring MVC, making it as simple as writing a regular controller.

web-uni-page-test

Pagination test module for Spring Boot Web environments, providing integrated tests for pagination functionality.

Quick Start, using uni-page-jdbc as an example

Maven Dependency


    com.github.ethancarter
    uni-page-jdbc
    1.9

Simple Example

public class PaginationTest {
   
    public void page() {
        PaginationStatementTemplate operations = new PaginationStatementTemplate();
        operations.addStatementExecutor(new Sql2oPaginationNamedParameterStatementExecutor(dataSource));
        
        // 1. 创建分页语句
        PaginationStatement statement = of(b -> b
                .sql("SELECT * FROM user WHERE username LIKE :username")
                .paramMap("username", "%admin%")
                .pageable(0, 10)
                .sort("id", Sort.Direction.DESC));
        
        // 2. 执行查询
        PageInformation information = operations.queryForInformation(statement);
        Page page = operations.queryForResultSet(statement, new JdbcBeanPropertyPaginationRowMapper<>(User.class));
    }

// User实体类 class User { private Long id; private String username; // getters and setters } }

Acknowledgments

During the development of this framework, I was deeply influenced and inspired by the open-source community. Thanks to those experts who selflessly share their technical experiences; it is your wisdom and contributions that made this framework possible. Special thanks to the excellent open-source projects that provided design inspiration and implementation ideas; these valuable experiences have allowed me to stand on the shoulders of giants and keep moving forward.

Thanks to all the technical experts who contribute to the open-source community!

🌟 Support the Project

If you find this project helpful, please click the ⭐Star at the top right to support me!

--- Tranlated By Open Ai Tx | Last indexed: 2025-08-28 ---