Tag: MyBatis

23 articles

Handwritten ORM Framework 4: Framework Optimization and D...

Optimize handwritten ORM framework, focusing on getMapper method implementation in DefaultSqlSession, using JDK dynamic proxy to create Mapper interface proxy objects. Practical analysis of princip...

Handwritten ORM Framework 3: SqlSession, Executor Working...

In-depth analysis of SqlSession and Executor working principles in handwritten ORM framework, detailing implementation mechanisms of SqlSessionFactoryBuilder, DefaultSqlSession, SimpleExecutor.

Handwritten ORM Framework 2: Resources, MappedStatement, ...

This article teaches you to handwrite an ORM framework, detailing the implementation of core components like Resources, MappedStatement, XMLBuilder, including configuration file parsing and mapping...

Handwritten ORM Framework 1 - JDBC Problems and Solutions

First article in the handwritten ORM framework series, introducing problems and disadvantages of traditional JDBC development and ORM framework design ideas and solutions. Practical analysis of pri...

MyBatis Design Patterns - Proxy Pattern and Source Code A...

Detailed introduction to proxy design pattern concepts, classifications, and their manifestation in MyBatis, including static and dynamic proxy code implementation and MapperProxy source code analy...

MyBatis Design Patterns - Builder Pattern, Factory Patter...

Detailed introduction to design patterns used in MyBatis source code including builder pattern, factory method pattern, singleton pattern, proxy pattern, composite pattern, and their manifestation ...

MyBatis Annotation Development - One-to-Many and Many-to-...

Detailed introduction to one-to-many and many-to-many mapping in MyBatis annotation development, including @Many annotation usage, user-order and user-role relationship implementation, and analysis...

MyBatis Annotation Development - Basic Introduction and O...

Detailed introduction to MyBatis annotation development approach, including usage of common annotations (@Select, @Insert, @Update, @Delete, @Results, etc.) and implementing one-to-one model mappin...

MyBatis Deep Dive - Many-to-Many Model with Collection Tags

Detailed explanation of many-to-many model mapping in MyBatis, including intermediate table design, user-role relationship implementation, collection tag usage, and complete code examples for many-...

MyBatis Deep Dive - One-to-Many Model with Collection Tags

Detailed explanation of one-to-many model mapping in MyBatis, including database table design, collection tag usage, Java entity class definitions, and implementation and testing of one-to-many que...

MyBatis Deep Dive - One-to-One Mapping, SqlMapConfig and ...

Detailed explanation of one-to-one model mapping in MyBatis, including database table design, Java entity class definitions, Mapper interface and XML configuration, and resultMap advanced mapping u...

MyBatis Deep Dive - Dynamic SQL, Parameters, Foreach, and...

In-depth explanation of MyBatis dynamic SQL configuration including if conditions, where tags, foreach loops, and sql fragment extraction. This article provides practical analysis of principles and...

MyBatis Mapper Proxy Invoke - Source Code Analysis

Detailed introduction to MyBatis Mapper Proxy dynamic proxy implementation principles, including getMapper source code analysis and MapperMethod execution process. Practical analysis of principles ...

MyBatis Deep Dive - SqlSessionFactory, SqlSession, DAO an...

In-depth explanation of MyBatis core components: SqlSessionFactory and SqlSession working principles, traditional DAO layer implementation, and MyBatis proxy development mode. Practical analysis of...

MyBatis Quick Start - CRUD Operations and XML Mapping Con...

MyBatis quick start continuation covering CRUD operations, XML mapping configuration, annotation-based development, and datasource/transaction management. This article provides in-depth analysis of...

MyBatis SqlSession, Executor, StatementHandler - Source C...

Detailed introduction to MyBatis core architecture design including three-tier architecture, SqlSession, Executor, StatementHandler working principles and source code analysis, and MyBatis initiali...

MyBatis Plugin Mechanism - PageHelper and Generic Mapper

Detailed introduction to MyBatis pagination plugin PageHelper and Generic Mapper usage, including configuration, code examples, PageInfo class usage, and Generic Mapper CRUD operations. Practical a...

MyBatis Quick Start - POM, Mapper, Core Files, CRUD Opera...

MyBatis quick start tutorial covering MyBatis development steps including POM dependency configuration, Mapper mapping files, SqlMapConfig core configuration file, and CRUD operations. Practical an...

MyBatis Deep Dive - ORM Concepts, Mapping Relations, and ...

This article introduces the MyBatis framework in depth, starting from ORM concepts, explaining MyBatis development history, technical advantages, and comparisons with common ORM frameworks like Hib...

MyBatis Plugin Mechanism - Principles, Custom Plugins, So...

Detailed introduction to MyBatis plugin mechanism including plugin principles, custom plugin development, intercepting four core components, @Intercepts annotation usage, and source code analysis. ...

MyBatis Level 2 Cache Integration with Redis, Testing and...

Detailed introduction to MyBatis level 2 cache integration with Redis for distributed caching across services, including pom configuration, mapper configuration, test code and source code analysis....

MyBatis Deep Dive - Level 1 Cache, Code Testing, and Sour...

Detailed introduction to MyBatis level 1 cache working principles, code testing, invalidation scenarios, and source code analysis. Level 1 cache is enabled by default in MyBatis with SqlSession-lev...

MyBatis Level 2 Cache - Testing and Source Code Analysis

Detailed introduction to MyBatis level 2 cache working principles, enable configuration, code testing, and source code analysis. Level 2 cache is based on Mapper namespace, and multiple SqlSessions...