Java High-Performance Architecture
Java High-Performance Architecture
Sep 12, 2023 · Backend Development

From JDBC to MyBatis: Transforming Low‑Level SQL Calls into a Powerful Persistence Framework

This article walks through the step‑by‑step evolution from raw JDBC queries to the MyBatis persistence layer, highlighting why JDBC should be wrapped, the design improvements MyBatis introduces, core components, execution flow, initialization mechanisms, and related design patterns, all illustrated with code snippets and diagrams.

Database AccessJDBCJava Persistence
0 likes · 37 min read
From JDBC to MyBatis: Transforming Low‑Level SQL Calls into a Powerful Persistence Framework
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Jan 26, 2021 · Backend Development

Master MyBatis: Common Return Values, Exceptions, and SQL Optimization Tips

This article shares practical MyBatis tips, detailing what different return types yield when no records match, common exceptions you may encounter, transaction lock behavior with FOR UPDATE, and essential SQL optimization strategies such as using LIMIT, proper indexing, and avoiding inefficient patterns.

Database PerformanceJava PersistenceMyBatis
0 likes · 8 min read
Master MyBatis: Common Return Values, Exceptions, and SQL Optimization Tips
Programmer DD
Programmer DD
Jan 14, 2021 · Backend Development

Why Spring Data JPA Can Slow Down Team Maintenance and When to Choose MyBatis

The article compares Spring Data JPA and MyBatis, highlighting that while Spring Data JPA speeds up individual development, it can create maintenance challenges for teams, especially when tracking slow queries, and argues that MyBatis may be a better choice for collaborative projects.

Backend DevelopmentJava PersistenceMyBatis
0 likes · 3 min read
Why Spring Data JPA Can Slow Down Team Maintenance and When to Choose MyBatis
Java Backend Technology
Java Backend Technology
Mar 4, 2018 · Backend Development

Why is DefaultSqlSession Not Thread‑Safe and How Does SqlSessionTemplate Ensure Safety?

This article examines the thread‑unsafe nature of MyBatis's DefaultSqlSession, explains how SqlSessionTemplate and SqlSessionManager use proxy and ThreadLocal mechanisms to provide safe database access in Spring‑integrated environments, and presents related interview questions for deeper understanding.

Java PersistenceMyBatisSpring Integration
0 likes · 7 min read
Why is DefaultSqlSession Not Thread‑Safe and How Does SqlSessionTemplate Ensure Safety?