MyBatis Source Code Analysis: Configuration Parsing Process
1. Configuration Parsing Process
MyBatis processes two types of configuration files during initialization. The first is the global configuration file (mybatis-config.xml), and the second comprises all Mapper.xml files, including annotations defined on Mapper interface classes.
How does this parsing work?
SqlSessionFactory factory = new SqlSessi ...
Posted on Fri, 25 Sep 2026 16:09:47 +0000 by ntsf
MyBatis Caching: First-Level, Second-Level, and EHCache Integration
Understanding MyBatis Caching Mechanisms
MyBatis incorporates an internal caching system designed to enhance application performance by minimizing redundant database interactions. This caching operates at two distinct levels: a local, session-scoped cache and a global, application-scoped cache.
First-Level Cache: SqlSession Scope
The first-leve ...
Posted on Wed, 20 May 2026 16:32:32 +0000 by Jackount