Mapping One-to-Many Relationships with MyBatis

In data-driven applications, it's common to deal with data spread across multiple related tables. Object-Relational Mapping (ORM) frameworks like MyBatis provide powerful features to map these relational structures into object models. This article focuses specificlaly on implementing one-to-many associations in MyBatis, where a single entity (t ...

Posted on Wed, 13 May 2026 08:30:43 +0000 by icedude

Comparing Decorator Pattern and Proxy Pattern in Software Design

The Decorator Pattern enables dynamic augmentation of functionality, offering a more flexible approach than single inheritance. It allows runtime extension of base class capabilities through composition. Flexible Functionality Enhancement Traditional inheritance creates rigid hierarchies, while decorators provide modular enhancements that can b ...

Posted on Sun, 10 May 2026 08:46:01 +0000 by fandelem

MyBatis Return Types: Handling List, Map, and Fuzzy Queries

Returning List Results When querying multiple records, MyBatis can automatically map results to a Java List. The mapper XML uses the same select element, but the Java method declares List as the return type. Mapper Interface: public interface StudentDao { List<Student> selectAllStudents(); } Mapper XML: <select id="selectAllS ...

Posted on Sat, 09 May 2026 22:54:07 +0000 by ChaosKnight

Seafood Processing and Sales Integrated Management System with Spring Boot, Vue.js, and UniApp

Overview This article presents a comprehensive management system designed for seafood processing and sales operations. The system leverages modern web technologies to provide an integrated solution for tracking products, managing inventory, and handling sales workflows. Technology Stack Backend: Spring Boot Spring Boot serves as the foundation ...

Posted on Sat, 09 May 2026 02:41:08 +0000 by Zaxnyd

Configuring Log4j 1 and Log4j 2 for MyBatis Logging

Include the necessary dependencies in your project's build file. For Log4j 2, use the log4j-core artifact. For Log4j 1, include the older log4j library. Ensure only one version is active on the classpath to avoid conflicts. <!-- Log4j 2 --> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId&g ...

Posted on Fri, 08 May 2026 18:17:30 +0000 by hollyspringer

Elderly Assessment System: Ability Data Statistics Module

Database Schema The ability assessment data is stored in a dedicated MySQL table with the following structure: CREATE TABLE ability_assessment ( citizen_id VARCHAR(20), daily_activity_score VARCHAR(10), mental_state_score VARCHAR(10), sensory_comm_score VARCHAR(10), social_participation_score VARCHAR(10), initial_level V ...

Posted on Fri, 08 May 2026 05:09:45 +0000 by mynameisbob

Implementing a Web Blog System with SSM Framework and JWT Authentication

Building a Blog Platform with Spring MVC, Spring, and MyBatis A web-based blog system is implemented using the SSM stack (Spring MVC, Spring, MyBatis). This platform consists of five core pages: user authentication, blog creation, blog editing, article listing, and post details. The backend is designed to fulfill the following functional requir ...

Posted on Fri, 08 May 2026 02:54:07 +0000 by cuongvt

Integrating MyBatis with Spring Framework

MyBatis-Spring Integration Before diving into the integration, let's review the core MyBatis components. Entity Class package com.example.entity; public class User { private Integer id; private String username; private String password; @Override public String toString() { return "User{" + ...

Posted on Thu, 07 May 2026 15:42:21 +0000 by binarymonkey

Automating MyBatis Code Generation with Maven and Plugin Configuration

Setting Up the Maven Project Begin by establishing a standard Maven project structure to house the generator configuration and dependencies. Configuring Maven Dependencies and Build Plugin Update the pom.xml to include the necessary libraries for MyBatis and the generator tool. The configuration below specifies the Maven plugin responsible f ...

Posted on Thu, 07 May 2026 03:30:36 +0000 by bodzan