Tagged articles

MyBatis

753 articles · Page 1 of 8
Architect's Guide
Architect's Guide
Jun 16, 2026 · Backend Development

How to Insert 300,000 Records in 13 Seconds with MyBatis and JDBC

The article compares several ways of inserting 300,000 MySQL rows—single‑row loops, an un‑batched MyBatis attempt that hits the max_allowed_packet limit, and a tuned batch strategy that commits every 1,000 rows—showing how the optimized batch reduces the runtime from hours to just 13 seconds and summarizing best‑practice tips.

Batch InsertJDBCJava
0 likes · 13 min read
How to Insert 300,000 Records in 13 Seconds with MyBatis and JDBC
Architect's Guide
Architect's Guide
Jun 8, 2026 · Backend Development

Three Practical Data Masking Solutions That Really Work

This article walks through three common data‑masking approaches—SQL queries using string functions, a Java‑based "sensitive‑plus" plugin, and the mybatis‑mate‑sensitive‑jackson extension—showing configuration, code examples, and how each method masks phone numbers, ID cards and other personal fields.

Data MaskingJavaMyBatis
0 likes · 10 min read
Three Practical Data Masking Solutions That Really Work
Java Tech Workshop
Java Tech Workshop
Jun 4, 2026 · Backend Development

Understanding SpringBoot Two‑Level Caching: MyBatis vs Application‑Level Cache

The article explains how layered caching in Java back‑ends—combining MyBatis first‑ and second‑level caches with a service‑layer Caffeine + Redis cache—affects cache granularity, consistency, distribution, and performance, and provides concrete configuration examples, code snippets, and best‑practice guidelines.

CacheCaffeineJava
0 likes · 16 min read
Understanding SpringBoot Two‑Level Caching: MyBatis vs Application‑Level Cache
Su San Talks Tech
Su San Talks Tech
Jun 2, 2026 · Backend Development

MybatisPlus Pro: Supercharging CRUD Development Efficiency

This article analyzes MybatisPlus Pro, explaining how it eliminates repetitive CRUD code in MyBatis‑Plus projects by providing a BaseController and utility classes that auto‑generate service and controller layers, while also detailing its internal mechanisms, advantages, drawbacks, suitable scenarios, and common pitfalls.

CRUDJavaMyBatis
0 likes · 22 min read
MybatisPlus Pro: Supercharging CRUD Development Efficiency
IoT Full-Stack Technology
IoT Full-Stack Technology
May 29, 2026 · Backend Development

How We Cut a 30‑Second API Call to Under 1 Second on 2 Million Records

In a high‑concurrency transaction system, the author diagnosed a 30‑second API latency caused by costly SQL scans and Java Map creation on over two million rows, then applied SQL aggregation, moved counting logic into PostgreSQL, and introduced a Caffeine cache, ultimately reducing the response time to under 0.8 seconds while highlighting relational‑database limits for massive data.

Caffeine cacheJavaMyBatis
0 likes · 10 min read
How We Cut a 30‑Second API Call to Under 1 Second on 2 Million Records
Java Architect Essentials
Java Architect Essentials
May 21, 2026 · Backend Development

Building a High‑Performance SpringBoot Log Analyzer for Slow SQL Detection from Scratch

Faced with massive MyBatis log files that made manual slow‑SQL hunting impossible, the author designed a SpringBoot‑Vue‑MySQL system that parses logs with multithreaded batch processing, flexible regex templates, real‑time performance monitoring, and virtual‑scroll UI, achieving 55 000 lines/s throughput and over 95% matching accuracy.

MyBatisSpring BootVue.js
0 likes · 11 min read
Building a High‑Performance SpringBoot Log Analyzer for Slow SQL Detection from Scratch
Java Architect Handbook
Java Architect Handbook
Apr 25, 2026 · Backend Development

Why MyBatis Mapper Interfaces Don't Need Implementation Classes

MyBatis generates mapper implementations at runtime using JDK dynamic proxies; the proxy intercepts interface calls, builds a statementId from the interface’s fully‑qualified name and method name, looks up the corresponding MappedStatement via the namespace‑id convention, and delegates execution to SqlSession, eliminating the need for a concrete class.

JDK Dynamic ProxyJavaMapperMethod
0 likes · 13 min read
Why MyBatis Mapper Interfaces Don't Need Implementation Classes
Java Tech Workshop
Java Tech Workshop
Apr 20, 2026 · Backend Development

Optimizing SpringBoot Batch Insert/Update with MyBatis: Real‑World Tips for High‑Volume Data

This article explains why naïve per‑record inserts or updates in SpringBoot cause severe performance problems, analyzes three common mistakes, and demonstrates how MyBatis batch processing—through connection reuse, prepared‑statement reuse, and batch transaction commits—can speed up operations by tens of times, with practical code examples and configuration tips for handling millions of rows.

BatchJavaMyBatis
0 likes · 21 min read
Optimizing SpringBoot Batch Insert/Update with MyBatis: Real‑World Tips for High‑Volume Data
Java Tech Workshop
Java Tech Workshop
Apr 19, 2026 · Backend Development

Getting Started with Sharding-JDBC in SpringBoot: A Practical Guide to Database Sharding

When a single database table grows to millions of rows, query performance and storage become bottlenecks, and this article explains why sharding is needed, introduces Sharding-JDBC as a lightweight solution, and walks through the complete setup, configuration, code implementation, testing, and advanced concepts such as sharding strategies, key generation, binding tables, and broadcast tables for SpringBoot projects.

Horizontal PartitioningMyBatisSharding-JDBC
0 likes · 33 min read
Getting Started with Sharding-JDBC in SpringBoot: A Practical Guide to Database Sharding
macrozheng
macrozheng
Apr 7, 2026 · Backend Development

Boost Your MyBatis Workflow in IDEA with MyBatisCodeHelper-Pro – A Complete Guide

This article introduces the MyBatisCodeHelper-Pro IntelliJ IDEA plugin, outlines its popular features such as mapper navigation, @Param generation, XML creation, pagination support, Spring integration, and SQL log conversion, and provides step‑by‑step installation and usage instructions with screenshots.

Backend DevelopmentIntelliJ IDEAMyBatis
0 likes · 5 min read
Boost Your MyBatis Workflow in IDEA with MyBatisCodeHelper-Pro – A Complete Guide
Java Tech Workshop
Java Tech Workshop
Apr 2, 2026 · Backend Development

SpringBoot Multiple Data Source Configuration for Basic Read‑Write Separation

This guide explains how to configure multiple data sources in SpringBoot to achieve basic read‑write separation, covering applicable scenarios, step‑by‑step setup of master and slave DataSources, SqlSessionFactory and SqlSessionTemplate beans, package‑based routing, transaction considerations, common pitfalls, and best‑practice recommendations.

JavaMultiple DataSourceMyBatis
0 likes · 9 min read
SpringBoot Multiple Data Source Configuration for Basic Read‑Write Separation
Java Tech Workshop
Java Tech Workshop
Apr 1, 2026 · Backend Development

Complete Guide to Integrating SpringBoot with MyBatis

This article walks through a full SpringBoot‑MyBatis integration, covering Maven dependencies, application.yml configuration, database schema, entity definition, mapper XML, service layer with transactions and pagination, REST controller endpoints, key features, and common pitfalls.

CRUDJavaMyBatis
0 likes · 13 min read
Complete Guide to Integrating SpringBoot with MyBatis
Top Architect
Top Architect
Mar 30, 2026 · Databases

How MyBatis Uses Over 10 Design Patterns to Simplify ORM Architecture

The article analyzes MyBatis’s 20,000‑line source code, showing how it applies more than ten classic design patterns—such as Factory, Singleton, Builder, Adapter, Proxy, Composite, Decorator, Template, Strategy, and Iterator—to decouple complex ORM scenarios, improve extensibility, and illustrate practical implementation details.

JavaMyBatisORM
0 likes · 12 min read
How MyBatis Uses Over 10 Design Patterns to Simplify ORM Architecture
Top Architect
Top Architect
Mar 30, 2026 · Backend Development

Why Upgrading to MyBatis‑Plus Breaks LocalDateTime Mapping and How to Fix It

A newcomer replaced MyBatis with MyBatis‑Plus in an old MySQL‑based project, triggering a "Conversion not supported for type java.time.LocalDateTime" error, which was traced to MyBatis 3.5.1 dropping built‑in type handling and an outdated mysql‑connector‑java, and resolved by upgrading the connector and adjusting validation logic.

ConnectorJavaMyBatis
0 likes · 10 min read
Why Upgrading to MyBatis‑Plus Breaks LocalDateTime Mapping and How to Fix It
java1234
java1234
Mar 29, 2026 · Backend Development

Why MyBatis Is Called a Semi‑ORM Mapping Tool

MyBatis, a widely used Java persistence framework, blends SQL mapping with traditional JDBC, requiring developers to write SQL manually, offering greater flexibility and performance than full ORM solutions like Hibernate, while providing only persistence operations without encapsulating complex business logic.

HibernateJavaMyBatis
0 likes · 6 min read
Why MyBatis Is Called a Semi‑ORM Mapping Tool
Top Architect
Top Architect
Mar 17, 2026 · Backend Development

Why Replacing MyBatis with MyBatis‑Plus Can Break Your DateTime Handling

A newcomer replaced MyBatis with MyBatis‑Plus in an old MySQL‑based project, encountered a "Conversion not supported for type java.time.LocalDateTime" error, traced it to MyBatis 3.5.1 dropping built‑in type handling and an outdated mysql‑connector‑java driver, and resolved it by upgrading the driver while also fixing a related validation bug that caused production failures.

JavaMyBatisdatabase
0 likes · 10 min read
Why Replacing MyBatis with MyBatis‑Plus Can Break Your DateTime Handling
JD Cloud Developers
JD Cloud Developers
Mar 17, 2026 · Backend Development

How to Build a MyBatis Plugin to Throttle Burst SQL Traffic and Protect Your Database

This article explores the challenges of sudden traffic spikes that overload applications and databases, and presents a step‑by‑step design, implementation, and optimization of a MyBatis plugin that intercepts SQL, applies fingerprint‑based rate limiting, and integrates with Joycode for rapid development and testing.

Database protectionJavaMyBatis
0 likes · 10 min read
How to Build a MyBatis Plugin to Throttle Burst SQL Traffic and Protect Your Database
JD Tech Talk
JD Tech Talk
Mar 17, 2026 · Backend Development

How to Build a MyBatis Plugin that Shields Databases from Sudden Traffic Spikes

This article explains the challenges of sudden traffic bursts on applications and databases, outlines a MyBatis plugin design that intercepts SQL, uses fingerprint‑based throttling with configurable policies, and details the development, optimization, testing, and documentation steps performed with pair‑programming assistance.

MyBatisPerformance OptimizationSQL interceptor
0 likes · 9 min read
How to Build a MyBatis Plugin that Shields Databases from Sudden Traffic Spikes
Architect's Guide
Architect's Guide
Mar 17, 2026 · Backend Development

Why Lombok’s Getter/Setter Naming Breaks MyBatis Inserts and How to Fix It

This article explains how Lombok’s generation of getter/setter methods for fields whose second character is uppercase can cause MyBatis to map properties incorrectly, leading to null values, and also examines why the @Accessor(chain=true) annotation breaks EasyExcel’s reflection, offering concrete solutions for each case.

EasyExcelGetterSetterLombok
0 likes · 9 min read
Why Lombok’s Getter/Setter Naming Breaks MyBatis Inserts and How to Fix It
java1234
java1234
Mar 8, 2026 · Backend Development

How to Build a Custom MyBatis Plugin: Step-by-Step Guide

This article explains the MyBatis plugin mechanism, walks through implementing the Interceptor interface, configuring the plugin in mybatis-config.xml, provides a complete code example, and outlines common use cases such as SQL logging, performance monitoring, permission control, and automatic field filling.

JavaMyBatisPlugin
0 likes · 6 min read
How to Build a Custom MyBatis Plugin: Step-by-Step Guide
Selected Java Interview Questions
Selected Java Interview Questions
Mar 3, 2026 · Backend Development

Automate Sensitive Data Encryption in MyBatis with Annotations and Interceptors

This article explains how to replace manual encryption code with a lightweight, annotation‑driven solution that uses a custom MyBatis interceptor to automatically encrypt and decrypt sensitive fields such as phone numbers, emails, and ID cards, improving code readability, maintainability, and security compliance.

AnnotationEncryptionJava
0 likes · 20 min read
Automate Sensitive Data Encryption in MyBatis with Annotations and Interceptors
java1234
java1234
Mar 3, 2026 · Backend Development

How MyBatis Plugins Execute: Core Interface and Runtime Flow

This article explains MyBatis’s plugin mechanism, detailing the Interceptor interface methods, how plugins form an interceptor chain to wrap core components like Executor, and provides a step‑by‑step example of a logging plugin with code and configuration, illustrating the runtime flow and extension capabilities.

JavaMyBatisPersistence
0 likes · 7 min read
How MyBatis Plugins Execute: Core Interface and Runtime Flow
Java Companion
Java Companion
Feb 10, 2026 · Backend Development

Why Successful Payments Vanished: MyBatis Connection‑Pool Pitfalls Explained

A production incident where payment orders appeared successful but were not persisted was traced to a missing commit in a special‑case branch, causing a polluted connection to be reused by Spring's transaction manager, leading to intermittent failures that were resolved by fixing the commit logic and adding connection‑pool health checks.

Connection PoolDatabase MonitoringHikariCP
0 likes · 10 min read
Why Successful Payments Vanished: MyBatis Connection‑Pool Pitfalls Explained
Java Architect Handbook
Java Architect Handbook
Feb 3, 2026 · Backend Development

Speeding Up 100k MySQL Inserts: From 5 Minutes to 3 Seconds in Java

This article walks through a real‑world data‑migration case where 100,000 rows were moved from an old system to a new one, showing how naive per‑row inserts took five minutes and how a series of optimizations—batch SQL, JDBC batch mode, and multithreaded parallelism—reduced the runtime to just three seconds, while also covering common pitfalls and the final high‑performance implementation.

Batch InsertJDBCJava
0 likes · 11 min read
Speeding Up 100k MySQL Inserts: From 5 Minutes to 3 Seconds in Java
macrozheng
macrozheng
Jan 30, 2026 · Backend Development

Why MyBatis Triggers OutOfMemoryError and How to Fix It

The article examines a production OutOfMemoryError caused by MyBatis SQL construction, explains heap and metaspace exhaustion, analyzes MyBatis source code, reproduces the issue with JVM settings, and offers practical recommendations to prevent similar memory failures.

JavaMemoryLeakMyBatis
0 likes · 7 min read
Why MyBatis Triggers OutOfMemoryError and How to Fix It
java1234
java1234
Jan 30, 2026 · Backend Development

How to Reduce MyBatis Batch Insert from 5 Minutes to 3 Seconds? Three Key Optimizations

The article walks through three concrete optimizations—batch SQL, JDBC batch mode with rewriteBatchedStatements, and multithreaded parallel inserts—that shrink a 100,000‑row MyBatis insertion from five minutes to three seconds, while highlighting configuration details, performance gains, and common pitfalls.

Batch InsertJDBCJava
0 likes · 10 min read
How to Reduce MyBatis Batch Insert from 5 Minutes to 3 Seconds? Three Key Optimizations
Java Companion
Java Companion
Jan 29, 2026 · Backend Development

How to Cut MyBatis Batch Insert Time from 5 Minutes to 3 Seconds: Three Key Optimizations

The article walks through turning a naïve MyBatis loop that took five minutes to insert 100,000 rows into a high‑performance solution that finishes in three seconds by applying batch SQL, JDBC batch mode with rewriteBatchedStatements, and multithreaded parallel execution, while highlighting pitfalls and best‑practice configurations.

Batch InsertExecutorType.BATCHJDBC
0 likes · 9 min read
How to Cut MyBatis Batch Insert Time from 5 Minutes to 3 Seconds: Three Key Optimizations
Java Architect Handbook
Java Architect Handbook
Jan 20, 2026 · Backend Development

Why Replacing MyBatis with MyBatis-Plus Triggers LocalDateTime Errors—and How to Fix Them

The article details a step‑by‑step migration from MyBatis 3.5.0 to MyBatis‑Plus 3.1.1, explains why the conversion error for java.time.LocalDateTime appears after the switch, shows how to trace the root cause through stack traces, upgrades the mysql‑connector‑java to 5.1.37 (and later 5.1.42) to resolve the issue, and shares broader lessons about component upgrades and unexpected bugs.

JDBCJavaMyBatis
0 likes · 10 min read
Why Replacing MyBatis with MyBatis-Plus Triggers LocalDateTime Errors—and How to Fix Them
SpringMeng
SpringMeng
Jan 16, 2026 · Backend Development

What Unexpected Pitfalls PageHelper Can Teach You After Years of Use

The article recounts a developer’s painful experience with PageHelper, detailing how duplicate registrations, truncated result sets, and password‑update errors stem from the plugin’s ThreadLocal pagination handling, and explains the underlying code paths and safe usage practices.

JavaMyBatisSQL
0 likes · 13 min read
What Unexpected Pitfalls PageHelper Can Teach You After Years of Use
Top Architect
Top Architect
Jan 8, 2026 · Fundamentals

What 10+ Design Patterns Power MyBatis’s 20k+ Lines of Code?

The article examines how MyBatis’s massive source code employs more than ten classic design patterns—creational, structural, and behavioral—to decouple complex scenarios, illustrating each pattern with diagrams, typical use‑cases, and related classes within the framework.

Behavioral PatternsCreational PatternsMyBatis
0 likes · 13 min read
What 10+ Design Patterns Power MyBatis’s 20k+ Lines of Code?
Top Architect
Top Architect
Jan 8, 2026 · Backend Development

Why MyBatis‑Plus Migration Fails: LocalDateTime Conversion and Connector Version Issues

A legacy project using MySQL 5.7, MyBatis 3.5.0 and mysql‑connector‑java 5.1.26 encounters a "Conversion not supported for type java.time.LocalDateTime" error after switching to MyBatis‑Plus 3.1.1, which is traced to MyBatis 3.5.1 dropping built‑in LocalDateTime handling and the old connector not supporting the type, requiring an upgrade to mysql‑connector‑java 5.1.37 or later.

JDBC driverMyBatisVersion Compatibility
0 likes · 9 min read
Why MyBatis‑Plus Migration Fails: LocalDateTime Conversion and Connector Version Issues
macrozheng
macrozheng
Jan 6, 2026 · Backend Development

Why PageHelper Can Break Your MyBatis Queries and How to Fix It

The article examines unexpected bugs caused by PageHelper’s hidden LIMIT clause injection in MyBatis projects, explains how ThreadLocal pagination parameters persist across requests, and provides practical guidelines and code examples to avoid and clean up these issues.

JavaMyBatisThreadLocal
0 likes · 13 min read
Why PageHelper Can Break Your MyBatis Queries and How to Fix It
Code Ape Tech Column
Code Ape Tech Column
Dec 18, 2025 · Backend Development

How to Co‑exist Multiple DataSources in Spring Without Switching?

This guide explains the concept of multi‑DataSource coexistence, when it is appropriate, step‑by‑step configuration for MySQL and TDengine, transaction manager handling, custom annotations, mapper scanning, differences from dynamic routing, common pitfalls, and best‑practice usage in a Spring‑MyBatis backend.

JavaMulti-DataSourceMyBatis
0 likes · 13 min read
How to Co‑exist Multiple DataSources in Spring Without Switching?
Java Architect Essentials
Java Architect Essentials
Dec 3, 2025 · Backend Development

How to Implement Data Isolation in Spring Boot with MyBatis Interceptor and JSqlParser

This guide shows how to achieve multi‑tenant data isolation in a Spring Boot application by creating a MyBatis interceptor that modifies SQL statements using JSqlParser, covering dependency setup, interceptor implementation, testing, and the rationale for intercepting the StatementHandler.prepare method.

Data IsolationJSqlParserMulti‑tenant
0 likes · 14 min read
How to Implement Data Isolation in Spring Boot with MyBatis Interceptor and JSqlParser
Selected Java Interview Questions
Selected Java Interview Questions
Dec 3, 2025 · Backend Development

Coexisting Multiple DataSources in Spring Boot: No Switching Needed

This guide explains how to configure Spring Boot applications to use multiple coexisting DataSource beans—such as MySQL and TDengine—without runtime switching, covering bean definitions, MyBatis mapper scanning, transaction manager setup, custom @Transactional annotations, and common pitfalls, enabling clean separation of business, log, and time‑series data.

Backend DevelopmentMultiple DataSourceMyBatis
0 likes · 12 min read
Coexisting Multiple DataSources in Spring Boot: No Switching Needed
Java Tech Enthusiast
Java Tech Enthusiast
Dec 2, 2025 · Backend Development

Auto‑Encrypt Sensitive Fields in Spring Boot with MyBatis Annotations

This article explains how to eliminate repetitive manual encryption code in Java applications by using a custom @Encrypted annotation together with a MyBatis interceptor, enabling transparent AES‑GCM encryption and decryption of sensitive fields such as phone numbers, emails, and ID numbers.

AnnotationField EncryptionJava
0 likes · 11 min read
Auto‑Encrypt Sensitive Fields in Spring Boot with MyBatis Annotations
Architecture Digest
Architecture Digest
Nov 19, 2025 · Information Security

Preventing SQL Injection: Use Prepared Statements and MyBatis Safely

SQL injection lets attackers turn simple input fields into destructive commands that can delete or compromise databases; the article explains how string‑concatenated queries become vulnerable, demonstrates the attack step‑by‑step, and shows how parameterized queries via PreparedStatement and MyBatis’ #{ } syntax, plus defense‑in‑depth measures, effectively mitigate the risk.

Database SecurityMyBatisParameterized Query
0 likes · 10 min read
Preventing SQL Injection: Use Prepared Statements and MyBatis Safely
Architect
Architect
Nov 16, 2025 · Backend Development

Unlocking MyBatis: 10 Design Patterns Powering Its Architecture

The article examines how MyBatis leverages around ten classic design patterns—grouped into Creational, Structural, and Behavioral categories—to decouple complex ORM logic, describing each pattern’s role, typical usage scenarios, and related components within the framework.

Backend DevelopmentJavaMyBatis
0 likes · 12 min read
Unlocking MyBatis: 10 Design Patterns Powering Its Architecture
Code Ape Tech Column
Code Ape Tech Column
Nov 4, 2025 · Backend Development

Master MyBatis Dynamic SQL: 9 Essential Tags and Best Practices

This article walks through nine powerful MyBatis dynamic SQL tags—including foreach, if, choose, selectKey, trim, and sql fragments—explaining their attributes, common pitfalls, and providing complete XML and Java examples to help developers write cleaner, error‑free queries and updates.

Dynamic SQLJavaMyBatis
0 likes · 17 min read
Master MyBatis Dynamic SQL: 9 Essential Tags and Best Practices
Architecture Digest
Architecture Digest
Nov 3, 2025 · Backend Development

Ensuring Transaction Rollback in Multithreaded Spring MyBatis Operations

This article explains why @Transactional fails in multithreaded MySQL insert scenarios, demonstrates how to split large data sets, configure a thread pool, and use SqlSession with manual commit to guarantee atomicity across parallel threads, complete with runnable code examples and test results.

JavaMyBatisSpring
0 likes · 8 min read
Ensuring Transaction Rollback in Multithreaded Spring MyBatis Operations
Java Web Project
Java Web Project
Oct 28, 2025 · Backend Development

Why Lombok’s Getter/Setter Naming Breaks MyBatis (and EasyExcel) and How to Fix It

The article analyzes a Lombok @Data‑generated getter/setter naming mismatch that causes MyBatis to store a null enum field, walks through debugging, examines MyBatis’s PropertyNamer source, demonstrates the issue with test code, and then explains a similar @Accessor(chain=true) problem in EasyExcel, offering concrete workarounds for both.

AnnotationEasyExcelGetterSetter
0 likes · 9 min read
Why Lombok’s Getter/Setter Naming Breaks MyBatis (and EasyExcel) and How to Fix It
Su San Talks Tech
Su San Talks Tech
Oct 18, 2025 · Backend Development

MyBatis vs Spring Data JPA: Which Should Power Your Spring Boot Project?

This article compares MyBatis and Spring Data JPA, explaining their core concepts, performance, flexibility, learning curve, community support, and real‑world scenarios, and provides code examples and decision criteria to help developers choose the right data‑access framework for their Spring Boot applications.

JavaMyBatisORM
0 likes · 14 min read
MyBatis vs Spring Data JPA: Which Should Power Your Spring Boot Project?
Java Tech Enthusiast
Java Tech Enthusiast
Oct 14, 2025 · Backend Development

How to Build a High‑Performance MyBatis Log Analyzer with Spring Boot

This article describes the design and implementation of a high‑performance log‑analysis system for massive MyBatis logs, covering problem analysis, technology selection, architecture, multithreaded parsing, flexible regex templates, performance monitoring, pitfalls, optimization practices, results, and future plans.

JavaMyBatisPerformance Optimization
0 likes · 13 min read
How to Build a High‑Performance MyBatis Log Analyzer with Spring Boot
Java Tech Enthusiast
Java Tech Enthusiast
Oct 11, 2025 · Backend Development

How MyBatis Interceptors Can Safeguard Your Java Service from Out‑of‑Memory Crashes

This article explains how oversized database query results can cause JVM memory spikes and OOM errors, and shows how to use MyBatis interceptors to monitor, limit, and protect memory consumption with non‑intrusive code, Prometheus metrics, and configurable thresholds, ultimately improving system stability and performance.

JavaMyBatisbackend
0 likes · 20 min read
How MyBatis Interceptors Can Safeguard Your Java Service from Out‑of‑Memory Crashes
Architect's Tech Stack
Architect's Tech Stack
Sep 27, 2025 · Backend Development

Ensuring Transaction Rollback in Multi‑Threaded Java Services

This article explains why @Transactional fails in multi‑threaded Spring services, provides a utility for splitting large data sets, shows thread‑pool configuration, demonstrates a failing transaction scenario, and presents a solution using manual MyBatis sqlSession commit to guarantee atomic rollback across all threads.

JavaMyBatisSpring
0 likes · 10 min read
Ensuring Transaction Rollback in Multi‑Threaded Java Services
Ray's Galactic Tech
Ray's Galactic Tech
Sep 24, 2025 · Backend Development

How to Set Up Multi-DataSource in Spring Boot with MyBatis

This guide walks through two approaches for configuring multiple databases in a Spring Boot and MyBatis project—native multi‑data‑source beans and the dynamic‑datasource‑spring‑boot‑starter—covering project structure, Maven dependencies, Java configuration, mapper setup, usage examples, common pitfalls, and a concise summary of when to choose each method.

JavaMulti-DataSourceMyBatis
0 likes · 9 min read
How to Set Up Multi-DataSource in Spring Boot with MyBatis
Architect's Guide
Architect's Guide
Sep 24, 2025 · Backend Development

Automate Java CRUD Code Generation: One-Click Tool for Fast Backend Development

The article introduces a self‑built utility that automatically generates Java backend code—including entity classes, DAO interfaces, service implementations, and controllers—based on database table definitions, dramatically reducing the manual effort of creating dozens of tables and their associated CRUD logic.

CRUDJavaMyBatis
0 likes · 17 min read
Automate Java CRUD Code Generation: One-Click Tool for Fast Backend Development
Ray's Galactic Tech
Ray's Galactic Tech
Sep 23, 2025 · Backend Development

15 MyBatis Pitfalls and How to Avoid Them

This guide lists the 15 most common MyBatis pitfalls—from SQL injection and mismatched field mappings to N+1 queries and improper pagination—paired with concrete best‑practice solutions, code snippets, and configuration tips to make your persistence layer safer, more efficient, and easier to maintain.

JavaMyBatisORM
0 likes · 8 min read
15 MyBatis Pitfalls and How to Avoid Them
Architecture Digest
Architecture Digest
Sep 16, 2025 · Databases

How to Insert 300,000 Records Efficiently with MyBatis and JDBC

This article demonstrates how to insert 300,000 rows into a MySQL table using MyBatis and JDBC, compares naïve single‑batch and per‑row approaches, presents optimized batch‑processing code with configurable batch sizes and wait times, and shares practical performance‑tuning tips such as index handling and connection‑pool configuration.

Batch InsertJDBCMyBatis
0 likes · 14 min read
How to Insert 300,000 Records Efficiently with MyBatis and JDBC
Architect's Tech Stack
Architect's Tech Stack
Sep 11, 2025 · Backend Development

Master MyBatis Streaming Queries: Reduce Memory Usage with Cursors

This article explains MyBatis streaming queries, introduces the Cursor interface and its methods, demonstrates common pitfalls, and provides three practical solutions—using SqlSessionFactory, TransactionTemplate, or @Transactional—to keep database connections open while processing large result sets efficiently.

CursorJavaMyBatis
0 likes · 7 min read
Master MyBatis Streaming Queries: Reduce Memory Usage with Cursors
Architect's Tech Stack
Architect's Tech Stack
Sep 11, 2025 · Backend Development

Master MyBatis Streaming Queries: Keep DB Connections Open Efficiently

This article explains MyBatis streaming queries using the Cursor interface, demonstrates common pitfalls such as closed connections, and provides three practical solutions—including SqlSessionFactory, TransactionTemplate, and @Transactional—to reliably process large result sets with minimal memory usage.

CursorJavaMyBatis
0 likes · 6 min read
Master MyBatis Streaming Queries: Keep DB Connections Open Efficiently
Su San Talks Tech
Su San Talks Tech
Sep 7, 2025 · Backend Development

How to Visualize SQL Call Trees with SpringBoot, MyBatis, and D3.js

This article explains how to build a SpringBoot‑MyBatis interceptor that captures SQL execution, constructs a hierarchical call tree, and visualizes it with D3.js, providing real‑time performance monitoring and debugging for complex business systems.

Backend DevelopmentD3.jsMyBatis
0 likes · 25 min read
How to Visualize SQL Call Trees with SpringBoot, MyBatis, and D3.js
Code Ape Tech Column
Code Ape Tech Column
Sep 1, 2025 · Backend Development

How to Visualize SQL Call Trees in SpringBoot with MyBatis and D3.js

This article demonstrates how to build a SpringBoot‑based SQL call‑tree visualization system using a MyBatis interceptor, D3.js front‑end, and thread‑local context to capture, organize, display and analyze SQL execution hierarchies, performance metrics and slow‑SQL detection for complex business applications.

D3.jsMyBatisSQL Visualization
0 likes · 20 min read
How to Visualize SQL Call Trees in SpringBoot with MyBatis and D3.js
macrozheng
macrozheng
Aug 7, 2025 · Databases

Boost Your MyBatis CRUD Efficiency with the MyBatis‑SQL‑Viewer Plugin

This article introduces the MyBatis‑SQL‑Viewer plugin, which transforms MyBatis XML into executable SQL, offers parameter mocking, syntax and compliance checks, index analysis, stress testing, and scanning features, dramatically simplifying CRUD development and improving SQL quality without restarting the application.

Database ToolMyBatisSQL Viewer
0 likes · 13 min read
Boost Your MyBatis CRUD Efficiency with the MyBatis‑SQL‑Viewer Plugin
Sanyou's Java Diary
Sanyou's Java Diary
Jul 31, 2025 · Databases

How MyBatis Interceptors Can Safeguard Your Java Service from Memory Overruns

This article explains how oversized database query results can cause JVM heap spikes, frequent Full GC, or OOM crashes in Java services, and demonstrates a non‑intrusive MyBatis interceptor solution that monitors, grades, and blocks risky queries while exposing Prometheus metrics for proactive alerting and capacity planning.

JavaMyBatisinterceptor
0 likes · 18 min read
How MyBatis Interceptors Can Safeguard Your Java Service from Memory Overruns
macrozheng
macrozheng
Jul 24, 2025 · Backend Development

Master Spring Annotation Development: From XML Beans to Pure Annotations

This article explains how Spring 3.0's pure annotation mode simplifies bean configuration, demonstrates replacing XML with @Component and @Configuration, covers bean scopes, dependency injection techniques like @Autowired, @Qualifier, @Value, and shows seamless integration of Spring with MyBatis for data access.

AnnotationDependency InjectionMyBatis
0 likes · 10 min read
Master Spring Annotation Development: From XML Beans to Pure Annotations
Java Captain
Java Captain
Jul 16, 2025 · Backend Development

Ensuring Transaction Rollback in Multi‑Threaded Spring Batch Inserts

This article explains why the @Transactional annotation fails in multithreaded Spring batch insert scenarios, demonstrates the problem with code examples, and shows how to use SqlSession for manual commit and rollback to guarantee atomicity across all threads.

JavaMyBatisSpring
0 likes · 10 min read
Ensuring Transaction Rollback in Multi‑Threaded Spring Batch Inserts
Java Tech Enthusiast
Java Tech Enthusiast
Jul 9, 2025 · Backend Development

Boost Your Java CRUD Speed with MybatisPlusPro: A Complete Guide

This article introduces MybatisPlusPro, an extension of MyBatis‑Plus that automates controller‑level CRUD, pagination, dynamic queries, data auditing, permission control, and performance optimizations, showing how developers can dramatically reduce code and improve efficiency in Java backend projects.

CRUDData AuditingMyBatis
0 likes · 10 min read
Boost Your Java CRUD Speed with MybatisPlusPro: A Complete Guide
Shepherd Advanced Notes
Shepherd Advanced Notes
Jul 9, 2025 · Databases

Comprehensive Guide to Fastest Batch Update Techniques in MyBatis

This article systematically compares six MyBatis batch‑update approaches—including simple for‑loop, foreach XML, CASE WHEN, ON DUPLICATE KEY UPDATE, REPLACE INTO, and MyBatis‑Plus—by presenting concrete code, execution‑time measurements on 10 000 rows, and analysis of I/O, SQL parsing, scalability, and database compatibility, ultimately recommending the most performant and maintainable method for different scenarios.

Batch UpdateCASE WHENMyBatis
0 likes · 13 min read
Comprehensive Guide to Fastest Batch Update Techniques in MyBatis
Architect's Tech Stack
Architect's Tech Stack
Jul 7, 2025 · Databases

Boost MyBatis Batch Inserts: Why foreach Slows Down and How to Fix It

This article explains why using MyBatis foreach for bulk inserts can cause severe performance degradation, analyzes the underlying parsing and executor issues, and provides practical solutions such as using ExecutorType.BATCH and limiting batch sizes to achieve fast, reliable batch insertion.

Batch InsertExecutorType.BATCHMyBatis
0 likes · 8 min read
Boost MyBatis Batch Inserts: Why foreach Slows Down and How to Fix It
Architecture Digest
Architecture Digest
Jul 3, 2025 · Backend Development

How to Implement Efficient MyBatis Streaming Queries in Spring Boot

This article explains what streaming queries are, why MyBatis's Cursor requires an open database connection, and presents three practical solutions—using SqlSessionFactory, TransactionTemplate, or @Transactional—to correctly implement MyBatis streaming queries in Spring applications while avoiding common pitfalls.

CursorDatabase ConnectionJava
0 likes · 6 min read
How to Implement Efficient MyBatis Streaming Queries in Spring Boot
Top Architect
Top Architect
Jun 27, 2025 · Databases

How to Implement High‑Performance Database Sharding with ShardingSphere and SpringBoot

This article walks through the complete process of designing, configuring, and coding a sharding solution for loan and repayment tables—including database basics, historical data migration, backend query refactoring, a three‑write strategy, scheduled consistency checks, and full SpringBoot/ShardingSphere implementation details.

Data MigrationMyBatisSharding
0 likes · 20 min read
How to Implement High‑Performance Database Sharding with ShardingSphere and SpringBoot
JD Tech
JD Tech
Jun 18, 2025 · Backend Development

How to Instantly Spot Problematic SQL with a MyBatis Coloring Interceptor

This article explains how to implement a lightweight MyBatis interceptor that annotates SQL statements with their mapper ID and execution stack, enabling developers to quickly locate performance bottlenecks during high‑traffic events, and also shows an AspectJ alternative for non‑MyBatis projects.

JavaMyBatisSQL
0 likes · 30 min read
How to Instantly Spot Problematic SQL with a MyBatis Coloring Interceptor
Java Architect Essentials
Java Architect Essentials
Jun 14, 2025 · Backend Development

Why System.out.println() Can Kill Your MyBatis Performance and How to Fix It

This article explains why MyBatis's default StdOutImpl logging, which relies on System.out.println, blocks threads and creates severe concurrency bottlenecks, and demonstrates how to replace it with asynchronous logging implementations like Slf4jImpl, configure log levels, and even create custom Log classes for optimal performance.

JavaLoggingMyBatis
0 likes · 8 min read
Why System.out.println() Can Kill Your MyBatis Performance and How to Fix It
Architect's Tech Stack
Architect's Tech Stack
Jun 11, 2025 · Backend Development

Master Dynamic Data Permissions in Java with easy-data-scope

This tutorial walks you through building a Spring Boot project that uses the easy-data-scope library to inject dynamic SQL for fine‑grained data permissions, covering database setup, Maven dependencies, core annotations, custom rule implementation, and practical query examples.

Backend DevelopmentData PermissionMyBatis
0 likes · 11 min read
Master Dynamic Data Permissions in Java with easy-data-scope
JD Tech Talk
JD Tech Talk
Jun 10, 2025 · Backend Development

Instantly Spot Problematic SQL with MyBatis Interceptor Coloring

This article explains how to use SQL coloring in MyBatis by implementing a lightweight interceptor or an AspectJ weave to annotate each SELECT statement with its mapper ID and execution stack, enabling rapid identification of performance bottlenecks during high‑traffic events.

AspectJDatabase MonitoringJava
0 likes · 29 min read
Instantly Spot Problematic SQL with MyBatis Interceptor Coloring
JD Cloud Developers
JD Cloud Developers
Jun 10, 2025 · Backend Development

How to Instantly Spot Problematic SQL with MyBatis Interceptor Coloring

This article introduces a lightweight SQL‑coloring technique for MyBatis that annotates each executed query with its mapper ID and call‑stack, enabling developers to pinpoint performance bottlenecks instantly without hunting through multiple code paths, and provides both MyBatis interceptor and AspectJ weaving implementations.

AspectJJavaMyBatis
0 likes · 30 min read
How to Instantly Spot Problematic SQL with MyBatis Interceptor Coloring
Architect's Guide
Architect's Guide
May 19, 2025 · Backend Development

Refactoring Data Validation with Java 8 Functional Interfaces and Lambda Expressions

This article demonstrates how to use Java 8's Function and SFunction functional interfaces together with lambda expressions to abstract and reuse data‑validation logic, dramatically reducing repetitive code, improving readability, and enabling flexible, generic validation across various backend entities.

Data ValidationFunctional ProgrammingJava
0 likes · 13 min read
Refactoring Data Validation with Java 8 Functional Interfaces and Lambda Expressions
Top Architect
Top Architect
May 10, 2025 · Backend Development

Optimizing a High‑Concurrency Backend Interface: Reducing Response Time from 30 seconds to 0.8 seconds

This article presents a real‑world case study of a high‑traffic backend API that originally took 30 seconds to process over two million records, detailing problem diagnosis, SQL and Java code analysis, and a series of optimizations—including SQL rewrites, database‑side aggregation, and Caffeine caching—that ultimately cut the response time to under one second.

Caffeine cacheMyBatisPostgreSQL
0 likes · 13 min read
Optimizing a High‑Concurrency Backend Interface: Reducing Response Time from 30 seconds to 0.8 seconds
Java Captain
Java Captain
May 8, 2025 · Backend Development

Guide to Using easy-data-scope for Dynamic SQL Data Permissions in Spring Boot

This tutorial explains how to set up and use the easy-data-scope library in a Spring Boot project to implement dynamic SQL data‑permission rules with MyBatis, covering database preparation, Maven dependencies, core annotations, configuration files, and example queries for various permission scenarios.

Data PermissionJavaMyBatis
0 likes · 10 min read
Guide to Using easy-data-scope for Dynamic SQL Data Permissions in Spring Boot