Skip to content
Tagged articles

MyBatis

500 articles · Page 5 of 5
Architecture Digest
Architecture Digest
Nov 16, 2022 · Backend Development

Comprehensive Collection of Interview Questions and Answers for Major Tech Companies (Java, Spring, Redis, MyBatis, etc.)

This article compiles over a thousand interview questions and detailed explanations covering core Java fundamentals, multithreading, Spring framework, Redis, MyBatis, and related backend technologies, offering a free downloadable resource to help candidates prepare effectively for major tech company interviews.

Interview questionsJavaMyBatis
0 likes · 8 min read
Comprehensive Collection of Interview Questions and Answers for Major Tech Companies (Java, Spring, Redis, MyBatis, etc.)
dbaplus Community
dbaplus Community
Nov 2, 2022 · Backend Development

How We Cut DB QPS by 80% with a Custom DAO Cache Layer

This article explains how a high‑traffic e‑commerce system reduced database QPS by over 80% and response latency by more than 40% through a systematic DAO‑level caching solution, detailing the background, design trade‑offs, implementation steps, global cache architecture, deployment practices, and observed limitations.

JavaMyBatisperformance
0 likes · 28 min read
How We Cut DB QPS by 80% with a Custom DAO Cache Layer
Top Architect
Top Architect
Nov 1, 2022 · Backend Development

Deep Dive into MyBatis SQL Execution Process and Custom TypeHandler

This article thoroughly explains how MyBatis binds mapper interfaces to XML files, details the step‑by‑step SQL execution flow—including mapper retrieval, statement preparation, parameter handling, and result mapping—and demonstrates how to create custom typeHandlers for both input parameters and result sets.

JavaMyBatisSQL
0 likes · 16 min read
Deep Dive into MyBatis SQL Execution Process and Custom TypeHandler
Cognitive Technology Team
Cognitive Technology Team
Oct 31, 2022 · Backend Development

Analysis of MyBatis First-Level and Second-Level Caches and Their Configuration

This article explains MyBatis's first-level (SqlSession-scoped) and second-level (Mapper-scoped) caching mechanisms, their default behaviors, key generation, configuration options, and the impact of Spring integration, and provides recommendations for disabling caches in distributed environments to avoid data inconsistency.

CacheJavaMyBatis
0 likes · 9 min read
Analysis of MyBatis First-Level and Second-Level Caches and Their Configuration
ITPUB
ITPUB
Oct 31, 2022 · Backend Development

Master MyBatis Caching: First- and Second-Level Cache Explained

This article explains MyBatis caching fundamentals, detailing first- and second-level cache concepts, configuration, cache invalidation scenarios, and custom cache integration with EHCache, supplemented by practical code snippets and quiz questions to illustrate cache behavior across SqlSessions.

CacheEhcacheJava
0 likes · 12 min read
Master MyBatis Caching: First- and Second-Level Cache Explained
Java High-Performance Architecture
Java High-Performance Architecture
Oct 30, 2022 · Backend Development

Boost Your Java Backend: Master MyBatisCodeHelper Pro for Rapid Code Generation

This guide walks you through installing the MyBatisCodeHelper‑Pro IntelliJ plugin, configuring it to generate Java entity, DAO, mapper and service code, customizing type mappings, creating SQL scripts, and using shortcuts to produce find, update, delete, and pagination methods efficiently for backend development.

BackendDAOIntelliJ
0 likes · 7 min read
Boost Your Java Backend: Master MyBatisCodeHelper Pro for Rapid Code Generation
macrozheng
macrozheng
Oct 30, 2022 · Backend Development

Which Java Technologies Are Obsolete? A 20‑Year Veteran’s Guide

Drawing on two decades of Java experience, this article evaluates outdated Java technologies—JSP, Struts, Hibernate, and others—based on real‑world development relevance, interview usefulness, and depth of understanding, and offers clear recommendations on what to skip and what to master.

HibernateJSPJava
0 likes · 8 min read
Which Java Technologies Are Obsolete? A 20‑Year Veteran’s Guide
macrozheng
macrozheng
Oct 25, 2022 · Backend Development

Master MyBatis in Spring Boot: Essential Tips, Dynamic SQL, and Advanced Queries

This guide walks you through integrating MyBatis with Spring Boot, covering basic CRUD operations, dynamic SQL constructs like if, choose, where, set, foreach, as well as advanced mapping techniques, pagination plugins, and practical code examples to help you master MyBatis in real-world projects.

JavaMyBatisORM
0 likes · 17 min read
Master MyBatis in Spring Boot: Essential Tips, Dynamic SQL, and Advanced Queries
Top Architect
Top Architect
Oct 20, 2022 · Databases

Performance Evaluation of Inserting Billion‑Scale Data into MySQL Using Java: MyBatis vs JDBC vs Batch Processing

This article presents a detailed performance test of inserting massive data into MySQL with Java, comparing three strategies—MyBatis lightweight insertion without transactions, direct JDBC handling with and without transactions, and JDBC batch processing—showing timing results for millions of rows and offering practical recommendations for high‑throughput data loading.

JDBCJavaMyBatis
0 likes · 14 min read
Performance Evaluation of Inserting Billion‑Scale Data into MySQL Using Java: MyBatis vs JDBC vs Batch Processing
Top Architect
Top Architect
Oct 14, 2022 · Backend Development

Spring Annotation Development and MyBatis Integration Guide

This article provides a comprehensive tutorial on using Spring annotations for pure annotation‑based development, defining beans, managing bean scopes, performing various injection techniques, reading configuration properties, and integrating Spring with MyBatis, complete with code examples and best‑practice tips.

AnnotationsJavaMyBatis
0 likes · 10 min read
Spring Annotation Development and MyBatis Integration Guide
Java Architect Essentials
Java Architect Essentials
Oct 10, 2022 · Backend Development

Implementing MyBatis TypeHandler for Field Encryption in Java

This article demonstrates how to securely store and retrieve sensitive fields such as phone numbers in a MySQL database by creating a custom Java Encrypt class, a MyBatis TypeHandler for automatic encryption/decryption, configuring the mapper XML, and verifying the solution with test results.

MyBatisTypeHandlerdatabase
0 likes · 8 min read
Implementing MyBatis TypeHandler for Field Encryption in Java
JD Cloud Developers
JD Cloud Developers
Oct 10, 2022 · Backend Development

How MyBatis Executes Queries and Fixes a Pre‑3.4.5 Bug

This article walks through MyBatis's complete query lifecycle—from configuration parsing, SqlSessionFactory creation, and mapper loading to the actual SELECT execution—while reproducing a pre‑3.4.5 bug caused by foreach variable leakage and presenting the official fix and upgrade recommendations.

BackendDebuggingJava
0 likes · 20 min read
How MyBatis Executes Queries and Fixes a Pre‑3.4.5 Bug
Java Architect Essentials
Java Architect Essentials
Sep 30, 2022 · Backend Development

Comprehensive Guide to Spring Annotation Development and MyBatis Integration

This article provides a step‑by‑step tutorial on using Spring annotations for bean definition, component scanning, scope management, autowiring, qualifier usage, simple value injection, property file loading, and finally demonstrates how to integrate Spring with MyBatis for streamlined data access in Java backend projects.

AnnotationsConfigurationMyBatis
0 likes · 9 min read
Comprehensive Guide to Spring Annotation Development and MyBatis Integration
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 20, 2022 · Backend Development

Understanding MyBatis First-Level and Second-Level Caches: Principles, Implementation, and Differences

This article explains the principles, implementation steps, and configuration of MyBatis first‑level (SqlSession) and second‑level (mapper) caches, compares their scopes and behaviors, and provides practical guidance on when and how to enable each cache to improve database query performance.

BackendCacheJava
0 likes · 7 min read
Understanding MyBatis First-Level and Second-Level Caches: Principles, Implementation, and Differences
Top Architect
Top Architect
Sep 13, 2022 · Information Security

Implementing Data Masking in MySQL and Java with MyBatis-Mate Sensitive Jackson

This article demonstrates how to mask sensitive data such as phone numbers and ID cards using SQL functions, introduces Java masking libraries, and provides a complete MyBatis-Mate Sensitive Jackson example with configuration, custom strategies, entity annotations, controller endpoints, and sample responses.

JavaMyBatisSQL
0 likes · 11 min read
Implementing Data Masking in MySQL and Java with MyBatis-Mate Sensitive Jackson
Senior Brother's Insights
Senior Brother's Insights
Sep 5, 2022 · Backend Development

How a Hidden Ternary Operator Triggered Massive Data Deletion in a Java Backend

After taking over a system via a server image, the author uncovered malicious modifications that used a ternary expression to force id=1, causing MyBatis to generate a “where 1=1” clause that deleted the entire T_QUART_DATA table, and later discovered cron jobs that removed core jars, illustrating a thorough forensic debugging process.

JavaLinuxMyBatis
0 likes · 7 min read
How a Hidden Ternary Operator Triggered Massive Data Deletion in a Java Backend
Su San Talks Tech
Su San Talks Tech
Sep 5, 2022 · Backend Development

Master MyBatis: Core Concepts, Interview Questions, and Practical Tips

This comprehensive guide explains MyBatis fundamentals, compares it with Hibernate, details its lifecycle, configuration, dynamic SQL, caching, lazy loading, batch operations, pagination, and plugin development, providing code examples and best‑practice recommendations for Java backend developers.

JavaMyBatisORM
0 likes · 38 min read
Master MyBatis: Core Concepts, Interview Questions, and Practical Tips
Programmer DD
Programmer DD
Sep 2, 2022 · Backend Development

Speed Up MyBatis Batch Inserts: Avoid foreach Pitfalls with ExecutorType.BATCH

An in‑depth guide explains why using MyBatis’s foreach for bulk inserts can cause severe performance degradation, especially with large tables, and demonstrates how switching to ExecutorType.BATCH or limiting batch sizes to 20‑50 rows dramatically reduces insertion time from minutes to seconds.

ExecutorType.BATCHJavaMyBatis
0 likes · 10 min read
Speed Up MyBatis Batch Inserts: Avoid foreach Pitfalls with ExecutorType.BATCH
Java Captain
Java Captain
Aug 25, 2022 · Databases

Optimizing MyBatis Batch Inserts: Reducing CPU Usage and Improving Performance

The article explains why MyBatis foreach‑based batch inserts can cause extreme CPU usage and long execution times, demonstrates how combining multiple VALUES into a single INSERT or using ExecutorType.BATCH dramatically improves performance, and provides practical code examples and sizing recommendations.

ExecutorType.BATCHMyBatisMySQL
0 likes · 8 min read
Optimizing MyBatis Batch Inserts: Reducing CPU Usage and Improving Performance
Su San Talks Tech
Su San Talks Tech
Aug 25, 2022 · Backend Development

Mastering Spring Transactions: From Basics to Advanced Propagation Types

This article explains the origins and purpose of Spring transactions, demonstrates how to quickly set them up with code examples, explores key features and common pitfalls, and provides an in‑depth comparison of the REQUIRED, REQUIRES_NEW, and NESTED propagation types for robust backend development.

AOPBackendJava
0 likes · 21 min read
Mastering Spring Transactions: From Basics to Advanced Propagation Types
Programmer DD
Programmer DD
Aug 21, 2022 · Backend Development

Why PageHelper Can Break Your MyBatis Queries: Hidden ThreadLocal Pitfalls

This article examines unexpected bugs caused by PageHelper in a Java/MyBatis project—such as duplicate registrations, limited dropdown results, and password‑reset errors—traces them to ThreadLocal misuse, explains the library’s internal pagination flow, and offers practical fixes to avoid these pitfalls.

JavaMyBatisPageHelper
0 likes · 14 min read
Why PageHelper Can Break Your MyBatis Queries: Hidden ThreadLocal Pitfalls
Architecture Digest
Architecture Digest
Aug 21, 2022 · Information Security

Implementing Database Field Encryption and Decryption with MyBatis Plugins

This article explains how to use MyBatis plugins to transparently encrypt specified database fields on write and decrypt them on read, covering the requirement background, system architecture, interceptor design, annotation usage, mapper adjustments, handling of pagination count queries, and practical implementation details.

Database EncryptionJavaMyBatis
0 likes · 17 min read
Implementing Database Field Encryption and Decryption with MyBatis Plugins
vivo Internet Technology
vivo Internet Technology
Aug 17, 2022 · Information Security

Implementing Database Field Encryption with a MyBatis Plugin

The article demonstrates how to implement lightweight field-level encryption in MyBatis by adding encrypted columns, creating a custom interceptor that encrypts annotated parameters on write and decrypts them on read, handling executor, statement, parameter, and result set processing, and addressing pagination count queries.

Database EncryptionJavaMyBatis
0 likes · 18 min read
Implementing Database Field Encryption with a MyBatis Plugin
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.

MyBatisPageHelperPagination
0 likes · 12 min read
Understanding PageHelper Pagination Issues and ThreadLocal Management in MyBatis
HomeTech
HomeTech
Aug 4, 2022 · Information Security

Preventing SQL Injection: Principles, Practices, and Safe MyBatis Usage

This article explains the fundamentals of SQL injection attacks, outlines their severe consequences, and provides a comprehensive set of prevention principles and practical measures—including parameterized queries, strong typing, input validation, and secure MyBatis configurations—to help developers safeguard backend applications and databases.

MyBatisPreparedStatementSQL injection
0 likes · 10 min read
Preventing SQL Injection: Principles, Practices, and Safe MyBatis Usage
Architect
Architect
Jul 28, 2022 · Information Security

Implementing Data Masking in MySQL and Java Using MyBatis‑Mate Sensitive Jackson

This article demonstrates how to mask sensitive data such as phone numbers, ID cards, and emails in MySQL and Java applications by combining SQL string functions with the MyBatis‑Mate Sensitive Jackson plugin, providing complete configuration, custom strategies, and runnable Spring Boot examples.

JavaMyBatisSQL
0 likes · 9 min read
Implementing Data Masking in MySQL and Java Using MyBatis‑Mate Sensitive Jackson
政采云技术
政采云技术
Jul 26, 2022 · Backend Development

Deep Dive into MyBatis: Architecture, Execution Flow, Plugins, Caching, and Spring Integration

This article provides a comprehensive analysis of MyBatis, covering its core architecture, the process of obtaining SqlSessionFactory and SqlSession, the dynamic proxy mechanism for mappers, the execution flow of SQL statements, the plugin system, first‑ and second‑level caching strategies, and how Spring manages MyBatis mappers through factory beans and import registrars.

CachingJavaMyBatis
0 likes · 39 min read
Deep Dive into MyBatis: Architecture, Execution Flow, Plugins, Caching, and Spring Integration
Java High-Performance Architecture
Java High-Performance Architecture
Jul 12, 2022 · Frontend Development

Build a Full-Stack Student Management System with Vue and SpringBoot

This guide walks through setting up a front‑back separated student management system, detailing Vue‑based front‑end deployment, SpringBoot + MyBatis back‑end configuration, database initialization, core features for admin, teacher, and student roles, and provides code snippets and screenshots to illustrate the complete workflow.

MyBatisSpringBootStudent Management
0 likes · 5 min read
Build a Full-Stack Student Management System with Vue and SpringBoot
DeWu Technology
DeWu Technology
Jul 11, 2022 · Databases

SQL Fine-Grained Management and Concurrency Control Best Practices

The guide recommends fine‑grained MySQL management in a MyBatis‑based order system—avoiding generic or dynamic SQL, explicitly using indexes, listing columns, limiting results, batching inserts, and checking row counts—while applying appropriate concurrency control (pessimistic FOR UPDATE or optimistic versioning) to improve performance, stability, and data integrity.

MyBatisSQLconcurrency control
0 likes · 18 min read
SQL Fine-Grained Management and Concurrency Control Best Practices
Cognitive Technology Team
Cognitive Technology Team
Jul 5, 2022 · Backend Development

Avoiding Unexpected Comma Formatting of Large Integers with MessageFormat in MyBatis SQL Generation

When using MessageFormat to inject integer parameters into dynamically generated MyBatis SQL, large numbers are automatically formatted with commas (e.g., 10000 becomes 10,000), which can break SQL statements, and the article explains why this happens and how to prevent it by converting numbers to strings before formatting.

DecimalFormatIntegerFormattingJava
0 likes · 3 min read
Avoiding Unexpected Comma Formatting of Large Integers with MessageFormat in MyBatis SQL Generation
Selected Java Interview Questions
Selected Java Interview Questions
Jul 4, 2022 · Backend Development

Introducing MyBatis-Mate: Enterprise‑Level Features for MyBatis‑Plus

This article introduces MyBatis‑Mate, an official MyBatis‑Plus extension that provides enterprise‑grade capabilities such as dictionary binding, field encryption, data masking, dynamic table maintenance, audit logging, sharding, multi‑datasource switching, and customizable data‑scope handling, all illustrated with code examples.

MyBatisShardingdata encryption
0 likes · 13 min read
Introducing MyBatis-Mate: Enterprise‑Level Features for MyBatis‑Plus
Sanyou's Java Diary
Sanyou's Java Diary
Jun 23, 2022 · Backend Development

Master MyBatis: From Basics to Advanced Features and Best Practices

This comprehensive guide explains what MyBatis is, compares it with Hibernate, details its core components, configuration, dynamic SQL, caching, plugins, pagination, and practical usage patterns, providing Java developers with clear examples, code snippets, and visual diagrams to master the framework efficiently.

Dynamic SQLMyBatisORM
0 likes · 38 min read
Master MyBatis: From Basics to Advanced Features and Best Practices
JD Tech
JD Tech
Jun 20, 2022 · Backend Development

Analyzing MyBatis Query Process and Fixing a Pre‑3.4.5 foreach Variable Bug

This article examines a MyBatis bug present in versions prior to 3.4.5 by reproducing the issue, walking through the complete query execution flow from configuration parsing to result handling, identifying the root cause in foreach variable binding, and presenting official fixes and practical work‑arounds.

BugFixMyBatisORM
0 likes · 19 min read
Analyzing MyBatis Query Process and Fixing a Pre‑3.4.5 foreach Variable Bug
政采云技术
政采云技术
Jun 14, 2022 · Backend Development

Performance Testing, Response Time Analysis, and Database Connection Pool Optimization for a Multi‑Table Query Service

This article presents a comprehensive performance testing case study of a multi‑table database query interface, detailing common performance metrics, response‑time classifications, step‑by‑step load‑test results, root‑cause analysis of CPU, memory, and connection‑pool bottlenecks, and demonstrates how tuning Druid’s maxActive and maxWait parameters optimizes throughput and reduces latency.

Database Connection PoolDruidMyBatis
0 likes · 12 min read
Performance Testing, Response Time Analysis, and Database Connection Pool Optimization for a Multi‑Table Query Service
Java Architect Essentials
Java Architect Essentials
Jun 12, 2022 · Backend Development

MyBatis-Mate: Advanced Features and Usage Guide for MyBatis-Plus in Java Backend Development

This article introduces MyBatis-Mate, an official MyBatis-Plus extension that offers enterprise‑grade capabilities such as dictionary binding, field encryption, data masking, dynamic DDL generation, multi‑datasource sharding, data‑scope filtering, and SQL performance logging, complete with Maven dependency setup and code examples.

DataEncryptionMyBatisORM
0 likes · 12 min read
MyBatis-Mate: Advanced Features and Usage Guide for MyBatis-Plus in Java Backend Development
Java Backend Technology
Java Backend Technology
Jun 11, 2022 · Information Security

How to Mask Sensitive Data in MySQL and Java with MyBatis‑Mate

This article demonstrates practical techniques for data masking, covering MySQL string functions for phone and ID masking, a Java library for various sensitive fields, and a MyBatis‑Mate extension that applies custom and built‑in masking strategies through annotations and REST endpoints.

JavaMyBatisSQL
0 likes · 8 min read
How to Mask Sensitive Data in MySQL and Java with MyBatis‑Mate
Programmer DD
Programmer DD
Jun 9, 2022 · Backend Development

Mastering Spring Boot Multi‑DataSource Integration with MyBatis

This tutorial explains how to configure Spring Boot with a single DataSource, integrate MyBatis, and extend the setup to a dynamic multi‑DataSource using AbstractRoutingDataSource, custom annotations, and AOP, covering connection pool setup, property mapping, and transaction management.

JavaMulti-DataSourceMyBatis
0 likes · 19 min read
Mastering Spring Boot Multi‑DataSource Integration with MyBatis
Cognitive Technology Team
Cognitive Technology Team
May 23, 2022 · Backend Development

Custom MyBatis Interceptor Mechanism – Java Dynamic Proxy

This article explains how to create a custom MyBatis Interceptor using Java dynamic proxies, detailing the Interceptor interface, the plugin generation process, the wrap and invoke methods, and common use‑cases such as pagination, SQL analysis, encryption, and performance monitoring.

InterceptorJavaMyBatis
0 likes · 4 min read
Custom MyBatis Interceptor Mechanism – Java Dynamic Proxy
Java Tech Enthusiast
Java Tech Enthusiast
May 23, 2022 · Backend Development

Implementing a Simple Java ORM Framework from Scratch

The article walks through building a lightweight Java ORM framework from scratch, showing JDBC drawbacks, defining XML configuration and mapper files, implementing core components like SqlSessionFactory, SimpleExecutor, and reflection‑based parameter and result mapping, and demonstrating a working test that returns POJOs.

JDBCJavaMyBatis
0 likes · 12 min read
Implementing a Simple Java ORM Framework from Scratch
Code Ape Tech Column
Code Ape Tech Column
May 18, 2022 · Backend Development

Integrating Spring Boot with MyBatis and Multi‑DataSource (Dynamic DataSource) – A Complete Guide

This article explains how to integrate Spring Boot with MyBatis, configure a single Druid data source, implement multi‑data‑source support using Spring's AbstractRoutingDataSource, create a dynamic data source with ThreadLocal, and wire everything together with custom annotations, aspects, and transaction management for backend Java applications.

BackendMulti-DataSourceMyBatis
0 likes · 18 min read
Integrating Spring Boot with MyBatis and Multi‑DataSource (Dynamic DataSource) – A Complete Guide
Top Architect
Top Architect
May 15, 2022 · Backend Development

Understanding MyBatis Batch Processing: Common Pitfalls and Optimized Solutions

This article walks through the challenges of inserting massive data sets with MyBatis, explains the inner workings of batch execution, highlights common mistakes with commit, clearCache and flushStatements, and presents progressively refined code examples—including Oracle-specific optimizations—to dramatically improve performance.

JavaMyBatisSQL
0 likes · 12 min read
Understanding MyBatis Batch Processing: Common Pitfalls and Optimized Solutions
Selected Java Interview Questions
Selected Java Interview Questions
May 14, 2022 · Backend Development

Optimizing Large‑Scale MySQL Updates with Manual Transactions and Multithreading in Spring Boot

This article demonstrates how to accelerate massive MySQL data updates in a Spring Boot application by replacing naïve loops with manual transaction control, multithreaded processing, CountDownLatch synchronization, and UNION‑based SQL batching, achieving up to a five‑fold speed increase.

Batch UpdateMultithreadingMyBatis
0 likes · 14 min read
Optimizing Large‑Scale MySQL Updates with Manual Transactions and Multithreading in Spring Boot
Java Backend Technology
Java Backend Technology
May 14, 2022 · Backend Development

Boosting Massive Data Updates in Spring Boot: Manual Transactions, Multithreading, and UNION Batch Tricks

An in‑depth guide shows how to accelerate updating tens of thousands of MySQL rows in a Spring Boot‑MyBatis project by switching from automatic per‑record commits to manual transactions, applying multithreaded execution with CountDownLatch coordination, and using UNION‑based batch updates when native batch support is unavailable.

MyBatisSpring Boottransaction
0 likes · 14 min read
Boosting Massive Data Updates in Spring Boot: Manual Transactions, Multithreading, and UNION Batch Tricks
21CTO
21CTO
May 13, 2022 · Backend Development

How Sonic Achieves Near‑Instant Hot Deployment for Java Services

This article details Meituan's internal Sonic IDEA plugin, explaining hot‑deployment concepts, why they matter, the technical challenges, and Sonic's architecture—including agents, instrumentation, class reloading, Spring Bean/XML/MyBatis reloads, and real‑world deployment experience—showing how code changes can become effective in seconds instead of minutes.

Hot DeploymentIDEA PluginJVM
0 likes · 21 min read
How Sonic Achieves Near‑Instant Hot Deployment for Java Services
Sohu Tech Products
Sohu Tech Products
May 11, 2022 · Backend Development

Optimizing Large-Scale Database Updates with Manual Transactions and Multithreading in Spring Boot MyBatis

This article demonstrates how to efficiently update up to 50,000 MySQL records in a Spring Boot‑MyBatis application by comparing simple loops, manual transaction control, multithreaded execution with CountDownLatch coordination, and union‑based batch updates, while analyzing performance and connection‑pool considerations.

MultithreadingMyBatisSpring Boot
0 likes · 14 min read
Optimizing Large-Scale Database Updates with Manual Transactions and Multithreading in Spring Boot MyBatis
Java High-Performance Architecture
Java High-Performance Architecture
May 5, 2022 · Backend Development

Master FastMybatis: Zero‑Config CRUD for Spring Boot

This article introduces FastMybatis, a lightweight Java MyBatis extension that enables zero‑configuration CRUD operations across multiple databases, shows how to quickly set up a Spring Boot project with the starter, provides full code examples for entities, mappers, services, a comprehensive mapper method list, and demonstrates Query object usage for flexible data retrieval.

CRUDFastMyBatisJava
0 likes · 10 min read
Master FastMybatis: Zero‑Config CRUD for Spring Boot
Code Ape Tech Column
Code Ape Tech Column
May 5, 2022 · Backend Development

Optimizing Bulk Database Updates with Manual Transactions and Multithreading in Spring/MyBatis

This article demonstrates how to dramatically speed up updating tens of thousands of records in a Spring‑MyBatis application by switching from automatic per‑operation commits to manual transaction control, applying multithreaded processing, tuning the Hikari connection pool, and using SQL UNION‑based batch updates.

MultithreadingMyBatisSpring
0 likes · 13 min read
Optimizing Bulk Database Updates with Manual Transactions and Multithreading in Spring/MyBatis
Cognitive Technology Team
Cognitive Technology Team
Apr 25, 2022 · Backend Development

Two Ways to Instantiate org.apache.ibatis.jdbc.SQL in MyBatis

This article explains two techniques for creating an org.apache.ibatis.jdbc.SQL object in MyBatis—using an anonymous inner class with an initializer block and using method‑chaining builder style—provides code examples, explains the underlying Java syntax, and summarizes their differences.

Builder PatternJavaMyBatis
0 likes · 4 min read
Two Ways to Instantiate org.apache.ibatis.jdbc.SQL in MyBatis
Java Backend Technology
Java Backend Technology
Apr 20, 2022 · Backend Development

How to Implement Efficient MyBatis Streaming Queries in Spring MVC

This article explains the concept of streaming queries, introduces MyBatis's Cursor interface with its key methods, and provides three practical solutions—using SqlSessionFactory, TransactionTemplate, or @Transactional—to keep database connections open and avoid cursor‑closed errors in Spring MVC applications.

CursorJavaMyBatis
0 likes · 7 min read
How to Implement Efficient MyBatis Streaming Queries in Spring MVC
Programmer DD
Programmer DD
Apr 9, 2022 · Backend Development

Will Spring Data JPA Fail Under Load? Lessons from the New Nucleic Acid Code

After encountering repeated errors and timeouts while retrieving the newly introduced 'nucleic acid code' in China, the author uses the experience to discuss why Spring Data JPA can cause performance problems in high‑concurrency systems compared to MyBatis, urging careful framework selection and deep SQL knowledge.

HibernateJavaMyBatis
0 likes · 6 min read
Will Spring Data JPA Fail Under Load? Lessons from the New Nucleic Acid Code
Java Interview Crash Guide
Java Interview Crash Guide
Mar 18, 2022 · Databases

Mastering MyBatis Streaming Queries: Keep Connections Open and Avoid Cursor Errors

Streaming queries return an iterator instead of a full result set, reducing memory usage, but require the database connection to stay open; this guide explains MyBatis’s Cursor interface, its methods, common pitfalls like premature closure, and three practical solutions using SqlSessionFactory, TransactionTemplate, or @Transactional to ensure reliable streaming.

CursorJavaMyBatis
0 likes · 6 min read
Mastering MyBatis Streaming Queries: Keep Connections Open and Avoid Cursor Errors
Meituan Technology Team
Meituan Technology Team
Mar 17, 2022 · Backend Development

Sonic: Meituan's Hot Deployment IDEA Plugin – Architecture and Implementation

The article details Meituan's internal Sonic IDEA plugin for remote and local hot deployment, explaining why hot deployment is needed, its architecture, instrumentation techniques, DCEVM integration, file‑watching, class reloading, and support for Spring Bean, Spring XML and MyBatis, along with adoption statistics and performance benefits.

DCEVMHot DeploymentIDEA Plugin
0 likes · 19 min read
Sonic: Meituan's Hot Deployment IDEA Plugin – Architecture and Implementation
Java High-Performance Architecture
Java High-Performance Architecture
Mar 17, 2022 · Backend Development

Mastering MyBatis Streaming Queries: Reduce Memory Usage and Avoid Cursor Closure Errors

This article explains what streaming queries are, why they save memory compared to pagination, details the MyBatis Cursor interface and its methods, demonstrates how to implement streaming queries with code examples, and presents three solutions—using SqlSessionFactory, TransactionTemplate, and @Transactional—to keep the database connection open and prevent cursor‑closed errors.

CursorJavaMyBatis
0 likes · 7 min read
Mastering MyBatis Streaming Queries: Reduce Memory Usage and Avoid Cursor Closure Errors
Top Architect
Top Architect
Mar 14, 2022 · Databases

Implementing Multi‑Business‑Unit Sales Queries with SQL Row‑Comparison in MySQL

This article explains how to design a MySQL table for product sales statistics and compares several query strategies—including loop queries, OR concatenation, mixed filtering, and the SQL‑92 row‑comparison technique—to efficiently retrieve sales data for multiple business units and their associated products in a single indexed query.

Dynamic SQLMyBatisMySQL
0 likes · 7 min read
Implementing Multi‑Business‑Unit Sales Queries with SQL Row‑Comparison in MySQL
YunZhu Net Technology Team
YunZhu Net Technology Team
Mar 10, 2022 · Backend Development

Elegant Solution for MyBatis Single‑Table Operations with MyBatis‑Pro Framework

The article introduces MyBatis‑Pro, a Spring‑Boot starter that eliminates manual single‑table SQL by generating CRUD methods through naming conventions, explains quick integration, core features, configuration options, entity annotations, logical‑delete strategies, generic services, and provides extensive code examples for developers.

JavaMyBatisORM
0 likes · 17 min read
Elegant Solution for MyBatis Single‑Table Operations with MyBatis‑Pro Framework
Java Architect Essentials
Java Architect Essentials
Feb 15, 2022 · Databases

mybatis-mate: An Enterprise‑Level MyBatis‑Plus Extension for Sharding, Data Auditing, Encryption, and More

This article introduces mybatis-mate, an official MyBatis‑Plus extension that provides enterprise‑grade features such as sharding, multi‑datasource support, data auditing, field encryption, sensitive‑data masking, automatic DDL maintenance, dynamic datasource switching, distributed transaction logging, and fine‑grained data permission control, with detailed usage examples and configuration snippets for Spring Boot projects.

Data AuditingJavaMyBatis
0 likes · 15 min read
mybatis-mate: An Enterprise‑Level MyBatis‑Plus Extension for Sharding, Data Auditing, Encryption, and More
Selected Java Interview Questions
Selected Java Interview Questions
Feb 11, 2022 · Backend Development

Implementing Sensitive Data Encryption and Decryption in Spring Boot Using MyBatis Interceptors and Custom Annotations

This article demonstrates how to automatically encrypt sensitive fields such as ID numbers and phone numbers before storing them in a database and decrypt them after retrieval by leveraging MyBatis plugins, custom annotations, and Spring Boot components, providing a clean, reusable solution for backend applications.

InterceptorJavaMyBatis
0 likes · 11 min read
Implementing Sensitive Data Encryption and Decryption in Spring Boot Using MyBatis Interceptors and Custom Annotations
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Feb 6, 2022 · Backend Development

Understanding MyBatis Architecture: Layers, Core Components, and Execution Flow

This article provides a comprehensive overview of MyBatis, detailing its three‑layer architecture, core modules such as caching, reflection, and transaction management, as well as the complete execution process from configuration files to SQL execution, helping developers master the framework for enterprise‑level Java applications.

BackendCachingJava
0 likes · 11 min read
Understanding MyBatis Architecture: Layers, Core Components, and Execution Flow
Selected Java Interview Questions
Selected Java Interview Questions
Jan 22, 2022 · Databases

Optimizing MyBatis Batch Inserts with ExecutorType.BATCH and Controlled foreach Values

This article analyzes why MyBatis foreach‑based batch inserts become extremely slow with thousands of rows, explains the underlying SQL and PreparedStatement overhead, and demonstrates how switching to ExecutorType.BATCH or limiting foreach values to 20‑50 rows dramatically improves MySQL insertion performance.

ExecutorType.BATCHJavaMyBatis
0 likes · 9 min read
Optimizing MyBatis Batch Inserts with ExecutorType.BATCH and Controlled foreach Values
Architecture Digest
Architecture Digest
Jan 18, 2022 · Databases

Implementing MyBatis TypeHandler for Field Encryption and Decryption

This article demonstrates how to securely store and retrieve sensitive user data such as phone numbers in a MySQL database by creating a custom MyBatis TypeHandler that automatically encrypts values on insert and decrypts them on query, complete with code examples and configuration steps.

Database SecurityJavaMyBatis
0 likes · 7 min read
Implementing MyBatis TypeHandler for Field Encryption and Decryption
Top Architect
Top Architect
Jan 13, 2022 · Backend Development

Understanding MyBatis Dynamic SQL: Parsing, Nodes, and Execution

This article explains MyBatis dynamic SQL, covering its purpose, the distinction between static and dynamic SQL, the core SqlNode and SqlSource classes, how MyBatis parses and assembles SQL scripts recursively, and provides concrete code examples to illustrate each step.

Code ExampleDynamic SQLJava
0 likes · 13 min read
Understanding MyBatis Dynamic SQL: Parsing, Nodes, and Execution
Top Architect
Top Architect
Jan 8, 2022 · Backend Development

Understanding the Differences Between ${} and #{} in MyBatis and Their Impact on SQL Injection

This article explains how MyBatis' ${} and #{} placeholders differ in syntax substitution and security, demonstrates their usage with DAO interfaces, Mapper XML, and JUnit tests, analyzes SQL injection risks, shows the underlying PreparedStatement handling, and provides practical guidelines for when to use each placeholder.

JavaMyBatisORM
0 likes · 11 min read
Understanding the Differences Between ${} and #{} in MyBatis and Their Impact on SQL Injection
Architect's Tech Stack
Architect's Tech Stack
Dec 16, 2021 · Databases

Optimizing MyBatis Batch Inserts with ExecutorType.BATCH and foreach Size Limits

This article explains why MyBatis batch inserts using a foreach loop can become extremely slow when inserting thousands of rows, analyzes the underlying cost of parsing large prepared statements, and presents practical solutions such as using ExecutorType.BATCH, limiting foreach batch size, and employing JDBC batch execution to achieve sub‑second performance.

Database PerformanceExecutorType.BATCHJava
0 likes · 8 min read
Optimizing MyBatis Batch Inserts with ExecutorType.BATCH and foreach Size Limits