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 Many-to-One Association Mapping Techniques
Mybatis Many-to-One Association Mapping Techniques
Database Schema Setup
First, let's create the database tables for our example. We'll have two tables: one for nations and another for leaders.
CREATE DATABASE `demo_db` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE `demo_db`.`nation` (
`nation_id` INT(10) NOT NULL AUT ...
Posted on Wed, 23 Sep 2026 16:34:10 +0000 by php_beginner_83
MyBatis Essential Patterns and Best Practices
Insert Operations
Retrieving Auto-Generated Primary Keys
<insert id="saveCustomer" useGeneratedKeys="true" keyProperty="customerId"
parameterType="com.example.domain.Customer">
INSERT INTO customer(name, points, created_at)
VALUES (#{name}, #{points}, #{createdAt})
</insert>
Batch ...
Posted on Mon, 21 Sep 2026 16:18:09 +0000 by desmortes
Implementing CRUD Operations with MyBatis XML Mappers
Implementing data persistence logic requires a clear mapping between Java objects and database tables. The following demonstration outlines the configuration and execution of Create, Read, Update, and Delete (CRUD) operations using MyBatis.
Entity Class Definition
First, define a Plain Old Java Object (POJO) to represent the data structure. T ...
Posted on Fri, 18 Sep 2026 16:28:18 +0000 by sungpeng
Understanding Cookie and Session for Web Authentication with Login/Registration Example
Introduction to Session Tracking
HTTP is a stateless protocol—each request from a client to a server is treated independently. To maintain user context across multiple requests (e.g., keeping a user logged in), web applications use session tracking.
A session begins when a user opens a browser and accesses a web application and ends when the ...
Posted on Thu, 17 Sep 2026 16:44:11 +0000 by micksworld
Implementing a Role-Based Attendance System with Java Web and MyBatis
A role-based employee attendance management system was implemented using Java Servlets, MyBatis, and MySQL. The system supports login, personal information management, password updates, and attendance tracking with differentiated views for employees, department managers, and administrators.
The data model consists of two primary entities:
Staf ...
Posted on Thu, 17 Sep 2026 16:28:35 +0000 by matifibrahim
Implementing CRUD Operations with MyBatis
Building upon foundational MyBatis knowledge, this guide demonstrates how to implement Create, Read, Update, and Delete (CRUD) operations using MyBatis with a clean and maintainable structure.
The implementation requires updates to three core components: the DAO enterface, its corresponding XML mapper, and test cases. All CRUD methods are conso ...
Posted on Mon, 14 Sep 2026 16:28:30 +0000 by andycole
MyBatis CRUD Operations Implementation Guide
Database Setup and Configuration
This guide demonstrtaes how to implement basic CRUD operations using MyBatis. We'll use a student management system as our example.
Database Initialization
CREATE DATABASE `test` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE `student` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR ...
Posted on Mon, 14 Sep 2026 16:05:00 +0000 by patmcv
Resolving Spring Transaction Rollback Failures Caused by MySQL MyISAM Storage Engine
During a Java-based system refactoring project—intended to replace an aging PHP application while reusing its existing MySQL database—developers observed inconsistent transaction behavior. Despite correctly applying @Transactional on service methods and deliberately triggering unchecked exceptions (e.g., int result = 1 / 0;), database changes p ...
Posted on Sun, 13 Sep 2026 16:05:31 +0000 by southofsomewhere
SpringBoot Vue.js Uniapp Resource Sharing Platform Development Guide
Detailed Video Demonstration
Contact the author for access to more detailed demonstration videos.
Specific Implementation Screenshots
Included in the documentation.
Technology Stack
Backend Framework: SpringBoot
Spring Boot, built on the Spring Framework, offers several advantages. It includes embedded servers like Tomcat, Jetty, and Undertow, ...
Posted on Sat, 12 Sep 2026 16:22:04 +0000 by prosolutions