Tag

PageHelper

0 views collected around this technical thread.

Selected Java Interview Questions
Selected Java Interview Questions
Apr 10, 2025 · Backend Development

Understanding PageHelper Issues and ThreadLocal Pitfalls in MyBatis

This article analyzes unexpected behaviors caused by PageHelper in a Java backend project, such as duplicate user registration, limited query results, and password‑reset errors, and explains how ThreadLocal pagination parameters, startPage(), and cleanup mechanisms lead to these problems while offering practical debugging tips.

MyBatisPageHelperSQL
0 likes · 11 min read
Understanding PageHelper Issues and ThreadLocal Pitfalls in MyBatis
Code Ape Tech Column
Code Ape Tech Column
May 4, 2024 · Backend Development

Understanding PageHelper Pagination Issues and ThreadLocal Management in MyBatis

This article analyzes common anomalies caused by the PageHelper pagination plugin in a Java backend project—such as duplicate user registration, limited query results, and password‑reset errors—traces them to ThreadLocal misuse, explains the internal workflow of startPage, getLocalPage, and clearPage, and offers practical recommendations to avoid these pitfalls.

MyBatisPageHelperSQL
0 likes · 11 min read
Understanding PageHelper Pagination Issues and ThreadLocal Management in MyBatis
JD Tech
JD Tech
Mar 11, 2024 · Backend Development

Understanding and Solving ThreadLocal Contamination Issues in MyBatis PageHelper Pagination

This article explains how PageHelper's static ThreadLocal pagination parameters can be polluted by exceptions or thread reuse, leading to incorrect query results, and provides detailed analysis of the plugin's internals together with practical solutions such as invoking clearPage() via filters or aspects.

MyBatisPageHelperbackend
0 likes · 10 min read
Understanding and Solving ThreadLocal Contamination Issues in MyBatis PageHelper Pagination
JD Tech
JD Tech
Mar 6, 2024 · Backend Development

Fixing Incorrect Total Count in PageHelper Pagination Using PageInfo

This article analyzes why the total record count returned by PageHelper mismatches the actual number of rows, examines the underlying PageInfo and PageSerializable source code, and provides a concrete solution that avoids type conversion and directly constructs PageInfo from the mapper result to ensure accurate pagination.

MyBatisPageHelperPageInfo
0 likes · 7 min read
Fixing Incorrect Total Count in PageHelper Pagination Using PageInfo
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 26, 2024 · Backend Development

Understanding and Configuring Pagination Rationalization with MyBatis PageHelper in SpringBoot

This article explains pagination rationalization in SpringBoot using MyBatis PageHelper, illustrates common unreasonable pagination scenarios, demonstrates a bug caused by page deletion, and shows how a simple two‑line configuration or per‑query setting resolves the issue while detailing the underlying implementation.

MyBatisPageHelperSpringBoot
0 likes · 8 min read
Understanding and Configuring Pagination Rationalization with MyBatis PageHelper in SpringBoot
Java Tech Enthusiast
Java Tech Enthusiast
Feb 9, 2024 · Backend Development

Understanding PageHelper Issues and ThreadLocal in MyBatis Pagination

Unexpected duplicate registrations, truncated query results, and password‑reset SQL errors in a Java backend were traced to PageHelper’s ThreadLocal pagination state persisting across requests when startPage() is called without immediate query execution, so developers should ensure immediate execution or manually clear the ThreadLocal to prevent stale LIMIT clauses.

MyBatisPageHelperbackend
0 likes · 12 min read
Understanding PageHelper Issues and ThreadLocal in MyBatis Pagination
Architect's Tech Stack
Architect's Tech Stack
Jan 26, 2024 · Backend Development

Understanding PageHelper Pagination Issues and ThreadLocal Pitfalls in Java Backend Development

The article analyzes unexpected behaviors caused by PageHelper in a Java backend project—such as duplicate registrations, limited query results, and password update errors—by dissecting its source code, ThreadLocal usage, and the importance of proper startPage() and clearPage() handling.

MyBatisPageHelperbackend
0 likes · 12 min read
Understanding PageHelper Pagination Issues and ThreadLocal Pitfalls in Java Backend Development
Sanyou's Java Diary
Sanyou's Java Diary
Dec 4, 2023 · Backend Development

When Pagination Breaks: Real‑World Bugs and Practical Fixes

This article recounts three production‑level pagination bugs encountered in a payment system, explains why they occurred—ranging from naive batch processing to MySQL's nondeterministic LIMIT behavior—and shows how proper pagination, ThreadLocal cleanup, and deterministic ordering resolve the issues.

MySQLPageHelperSQL
0 likes · 16 min read
When Pagination Breaks: Real‑World Bugs and Practical Fixes
macrozheng
macrozheng
Nov 6, 2023 · Backend Development

Mastering MyBatis PageHelper: Avoid Common Pagination Pitfalls

This article explains the core principles and multiple usage patterns of MyBatis PageHelper for pagination, demonstrates code examples, details its internal ThreadLocal and interceptor mechanisms, and highlights common pitfalls with safe versus unsafe practices to ensure reliable data retrieval.

MyBatisPageHelperbackend
0 likes · 9 min read
Mastering MyBatis PageHelper: Avoid Common Pagination Pitfalls
Top Architect
Top Architect
Mar 31, 2023 · Backend Development

Why MyBatis PageHelper Pagination Is Slow and How to Optimize It

The article explains that MyBatis PageHelper performs an extra full‑table count query causing pagination to take over eight seconds on a 10,000‑row table, analyzes the root cause, and provides a concrete solution by customizing the count SQL with a _COUNT method and optimized mapper definitions.

Backend DevelopmentMyBatisPageHelper
0 likes · 6 min read
Why MyBatis PageHelper Pagination Is Slow and How to Optimize It
Top Architect
Top Architect
Aug 25, 2022 · Backend Development

Understanding PageHelper Pagination Issues in MyBatis and How to Avoid ThreadLocal Pitfalls

This article explains common anomalies caused by PageHelper in MyBatis projects, such as duplicate registrations and unexpected LIMIT clauses, analyzes the underlying ThreadLocal mechanism, and provides practical guidance on correctly using startPage() and clearPage() to prevent pagination bugs.

MyBatisPageHelperjava
0 likes · 12 min read
Understanding PageHelper Pagination Issues in MyBatis and How to Avoid ThreadLocal Pitfalls
Selected Java Interview Questions
Selected Java Interview Questions
Aug 13, 2022 · Backend Development

Understanding PageHelper Pagination Issues and ThreadLocal Management in MyBatis

This article explains how PageHelper integrates with MyBatis, analyzes common pagination bugs such as unexpected LIMIT clauses, duplicate registrations, and password‑reset errors, and demonstrates the internal ThreadLocal handling, startPage usage, and proper cleanup to avoid thread‑local pollution.

MyBatisPageHelperbackend
0 likes · 12 min read
Understanding PageHelper Pagination Issues and ThreadLocal Management in MyBatis
Top Architect
Top Architect
Feb 17, 2021 · Backend Development

Understanding and Optimizing MyBatis PageHelper Pagination Performance

This article analyzes the performance bottlenecks of PageHelper's pagination in MyBatis, demonstrates how large offsets degrade MySQL query speed, and presents a more efficient sub‑query join solution along with suggestions for refactoring the interceptor to improve backend pagination efficiency.

MyBatisPageHelperPerformance
0 likes · 9 min read
Understanding and Optimizing MyBatis PageHelper Pagination Performance
Top Architect
Top Architect
Dec 16, 2020 · Backend Development

Integrating PageHelper with SpringBoot and MyBatis for Efficient Pagination

This article provides a comprehensive guide on integrating PageHelper with SpringBoot and MyBatis, covering development preparation, dependency configuration, basic and advanced usage patterns, code examples, and detailed explanations of pagination mechanisms, including PageParam design and MyBatis interceptor internals.

MyBatisPageHelperSpringBoot
0 likes · 19 min read
Integrating PageHelper with SpringBoot and MyBatis for Efficient Pagination
Java Captain
Java Captain
Nov 7, 2019 · Backend Development

Integrating Spring Boot with MyBatis, Druid, and PageHelper for Multi‑DataSource and Pagination

This article demonstrates how to combine Spring Boot with MyBatis, Druid connection pool, and PageHelper pagination plugin to configure multiple data sources, set up monitoring, and perform efficient paged queries, providing complete Maven dependencies, property settings, and Java configuration examples.

DruidMyBatisPageHelper
0 likes · 18 min read
Integrating Spring Boot with MyBatis, Druid, and PageHelper for Multi‑DataSource and Pagination