Tagged articles

MyBatis

774 articles · Page 1 of 8
Java Tech Enthusiast
Java Tech Enthusiast
Sep 12, 2026 · Backend Development

What MyBatis Does at Startup: From MappedStatement to Dynamic SQL Parsing

This article dissects MyBatis startup internals, explaining how Mapper interfaces and XML SQL are parsed into MappedStatement objects, the role of SqlSource in static vs dynamic SQL, the #{}/${} difference, and how JDK dynamic proxies enable interface method execution without implementation classes.

ConfigurationDynamic SQLJDK Dynamic Proxy
0 likes · 35 min read
What MyBatis Does at Startup: From MappedStatement to Dynamic SQL Parsing
Programmer1970
Programmer1970
Sep 2, 2026 · Backend Development

One TINYINT Field, Four Notification Switches: Bitmask Pattern in Practice

This article demonstrates how to store four independent notification channel switches (SMS, email, in-app, WeChat) in a single MySQL TINYINT column using bitwise operations, covering schema design, SQL queries, Java enum and utility classes, service and controller layers, MyBatis mapper, extensibility to N channels, and key considerations like indexing, concurrency, and readability.

JavaMyBatisMySQL
0 likes · 14 min read
One TINYINT Field, Four Notification Switches: Bitmask Pattern in Practice
Architect's Guide
Architect's Guide
Aug 18, 2026 · Backend Development

Boost CRUD Development Speed 100× with This Open‑Source Code Generator

Manually creating entity classes, CRUD interfaces and SQL for dozens of tables can consume dozens of hours, so the author built an open‑source tool that automatically generates the full backend stack—from table definition to Java models, MyBatis mappers, services and controllers—dramatically accelerating development.

BackendCRUDJava
0 likes · 17 min read
Boost CRUD Development Speed 100× with This Open‑Source Code Generator
Dabaoshi
Dabaoshi
Aug 13, 2026 · Fundamentals

Design Patterns 23 – Final Overview: Mapping All 23 Patterns onto One Diagram

The article wraps up the "Design Pattern Dissection" series by showing how the 23 GoF patterns appear in JDK, Spring and MyBatis, clarifying the most confusing pattern pairs, warning against over‑design, and presenting a comprehensive map that links each pattern to the seven core design principles.

Design PatternsGoFJava
0 likes · 12 min read
Design Patterns 23 – Final Overview: Mapping All 23 Patterns onto One Diagram
Architect's Tech Stack
Architect's Tech Stack
Aug 12, 2026 · Backend Development

A Read‑Only ORM That’s 100× Faster Than MyBatis

BeanSearcher, a read‑only Java ORM, generates SQL from declarative annotations and maps HTTP query parameters directly to query conditions, allowing complex multi‑table, aggregation and sorting queries with a single line of code and claiming performance up to a hundred times faster than MyBatis.

BeanSearcherJavaMyBatis
0 likes · 4 min read
A Read‑Only ORM That’s 100× Faster Than MyBatis
Architect's Guide
Architect's Guide
Aug 12, 2026 · Backend Development

Six Years In, This Java Code Made Me Cringe

The article recounts a six‑year veteran’s encounter with a tangled Java data‑isolation implementation, explains how a custom MyBatis interceptor and annotation were used to inject and filter an env field across dozens of tables, and reflects on the code smell and refactoring lessons learned.

Custom AnnotationData IsolationInterceptor
0 likes · 13 min read
Six Years In, This Java Code Made Me Cringe
CodeSmart Hoops
CodeSmart Hoops
Aug 6, 2026 · Backend Development

Spring Container Full-Stack Walkthrough: 12 Interview Questions & Answers

This article provides a comprehensive Spring container walkthrough covering the full lifecycle—from bean definition scanning and proxy creation during startup to request handling, AOP interception, transaction and caching mechanisms—plus detailed answers to 12 common interview questions with code examples and best‑practice recommendations.

AOPBackendIOC
0 likes · 21 min read
Spring Container Full-Stack Walkthrough: 12 Interview Questions & Answers
Ray's Galactic Tech
Ray's Galactic Tech
Aug 3, 2026 · Information Security

Are You Implementing Field-Level Encryption Correctly? Best Practices Explained

This article examines common pitfalls and misconceptions in field‑level encryption, explains why AES‑GCM and proper AAD are essential, outlines threat modeling, key hierarchy, blind indexing for searchable data, migration strategies, key rotation, performance considerations, and secure integration with MyBatis, Kubernetes, and Vault.

AES-GCMBlind IndexingField-Level Encryption
0 likes · 49 min read
Are You Implementing Field-Level Encryption Correctly? Best Practices Explained
Xiaolin Talks Programming
Xiaolin Talks Programming
Jul 14, 2026 · Backend Development

ORM Performance Tuning in Spring Boot: Fixing N+1 Queries, Dynamic SQL Optimization & Fetch Strategies

This guide covers root-cause analysis of N+1 queries in JPA and MyBatis, APM-based detection methods, fetch strategy optimization using EntityGraph and JOIN FETCH, MyBatis resultMap refactoring, lazy-loading boundaries, second-level cache trade-offs, keyset pagination, and production-grade SQL interceptors with code review checklists.

Fetch StrategyJPAMyBatis
0 likes · 21 min read
ORM Performance Tuning in Spring Boot: Fixing N+1 Queries, Dynamic SQL Optimization & Fetch Strategies
samdeepthink
samdeepthink
Jul 4, 2026 · Backend Development

How MyBatis Locates Mapper SQL: A Full Call‑Chain Trace

The article explains MyBatis’s three‑stage process—building an in‑memory mapping dictionary at startup, using JDK dynamic proxies to bind interface methods to that dictionary, and the runtime execution flow that translates a mapper call into JDBC operations, highlighting design choices such as builder chains, pre‑loading, and composition over inheritance.

JavaMyBatisORM
0 likes · 10 min read
How MyBatis Locates Mapper SQL: A Full Call‑Chain Trace
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
CodeSmart Hoops
CodeSmart Hoops
Jun 8, 2026 · Backend Development

Hands‑On Unit Tests for a Complete MyBatis Integration with Spring Boot 3

This guide walks through a full MyBatis unit‑testing suite built on Spring Boot 3.x and JDK 17+, showing how to configure Maven dependencies, set up an H2 datasource, write POJOs, define mapper interfaces and XML, and verify features such as mapper proxies, parameter binding, dynamic SQL, resultMap mapping, camel‑case conversion and first‑level caching with JUnit 5.

Dynamic SQLJUnit 5MyBatis
0 likes · 25 min read
Hands‑On Unit Tests for a Complete MyBatis Integration with Spring Boot 3
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.

JavaMyBatisSQL
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.

BackendCaffeineJava
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.

MyBatisPerformance MonitoringSlow SQL
0 likes · 11 min read
Building a High‑Performance SpringBoot Log Analyzer for Slow SQL Detection from Scratch
Cloud Architecture
Cloud Architecture
Apr 29, 2026 · Databases

ORM Type Mismatch Causes MySQL Index Failure and Outage – Investigation & Fix

An ORM parameter type mismatch caused MySQL to perform implicit conversion on a VARCHAR index column, turning an indexed query into a full table scan that saturated connection pools, thread pools, Kafka consumers, and upstream services during a high‑traffic promotion, illustrating the full‑stack impact and remediation steps.

Index OptimizationMyBatisMySQL
0 likes · 29 min read
ORM Type Mismatch Causes MySQL Index Failure and Outage – Investigation & Fix
Cloud Architecture
Cloud Architecture
Apr 27, 2026 · Backend Development

Building an Enterprise‑Level MyBatis Persistence Layer from Zero to One

The article walks through a real production incident caused by a massive IN‑list query, then presents a complete methodology for designing, implementing, and tuning an enterprise‑grade MyBatis persistence layer—including core execution chain, caching strategies, batch processing, read/write splitting, sharding, observability, and deployment best practices.

Batch ProcessingMicroservicesMyBatis
0 likes · 39 min read
Building an Enterprise‑Level MyBatis Persistence Layer from Zero to One
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.

JavaMyBatisSpringBoot
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 PartitioningMyBatisMySQL
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.

Design PatternsJavaMyBatis
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.

ConnectorJavaLocalDateTime
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.

JavaMyBatisMyBatis-Plus
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.

BackendDatabase protectionJava
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.

InterceptorJavaMyBatis
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.

InterceptorJavaMyBatis
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.

InterceptorJavaMyBatis
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.

Database MonitoringHikariCPMyBatis
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.

BackendHeapJava
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.

BackendJavaMyBatis
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 driverLocalDateTimeMyBatis
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 IsolationJSqlParserMyBatis
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.

Field EncryptionJavaMyBatis
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 DevelopmentDesign PatternsJava
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.

BackendDynamic SQLJava
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.

ConcurrencyJavaMyBatis
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.

EasyExcelGetterSetterJava
0 likes · 9 min read
Why Lombok’s Getter/Setter Naming Breaks MyBatis (and EasyExcel) and How to Fix It
Programmer1970
Programmer1970
Oct 23, 2025 · Backend Development

Flowable Workflow Engine: Modular Architecture and Design Principles

The article explains how Flowable, a fork of Activiti, achieves high extensibility and performance through a four‑layer modular architecture, MyBatis‑based persistence, core engine services, dual Java/REST APIs, pluggable extensions, a detailed state machine, async execution, transaction safety, and practical tuning tips.

AsyncExecutorBPMCommandPattern
0 likes · 10 min read
Flowable Workflow Engine: Modular Architecture and Design Principles
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.

BackendInterceptorJava
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.

BackendCursorJava
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
Java Tech Enthusiast
Java Tech Enthusiast
Sep 2, 2025 · Backend Development

Build a Real‑Time SQL Call Tree Visualizer for SpringBoot & MyBatis using D3.js

This article presents a SpringBoot‑MyBatis solution that captures SQL execution via an interceptor, builds a hierarchical call tree, visualizes it with D3.js, and provides REST APIs for real‑time monitoring, performance statistics, and configuration, helping developers debug complex queries and identify slow SQL.

D3.jsMyBatisPerformance Analysis
0 likes · 24 min read
Build a Real‑Time SQL Call Tree Visualizer for SpringBoot & MyBatis using 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.

InterceptorJavaMyBatis
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.

Dependency InjectionMyBatisSpring
0 likes · 10 min read
Master Spring Annotation Development: From XML Beans to Pure Annotations