Tagged articles
29 articles
Page 1 of 1
macrozheng
macrozheng
Aug 26, 2025 · Backend Development

Master MapStruct: Powerful Java Object Mapping for Spring Boot Projects

This guide introduces MapStruct, a Java annotation‑based mapper that outperforms BeanUtils by providing fast, type‑safe conversions between PO, VO, DTO and nested objects, supporting collections, custom logic, dependency injection, constants, expressions, and exception handling within Spring Boot applications.

Object Mappingdtomapper
0 likes · 17 min read
Master MapStruct: Powerful Java Object Mapping for Spring Boot Projects
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 25, 2023 · Backend Development

Understanding Spring’s FactoryBean and MyBatis Integration: From BeanFactory to MapperFactoryBean

This article explains how Spring’s FactoryBean mechanism enables seamless integration with MyBatis by detailing the roles of BeanFactory, SqlSessionFactoryBean, MapperScannerConfigurer, and MapperFactoryBean, and provides annotated code examples and XML configuration to illustrate the underlying process and its benefits for transaction management and thread safety.

Backend DevelopmentFactoryBeanIntegration
0 likes · 13 min read
Understanding Spring’s FactoryBean and MyBatis Integration: From BeanFactory to MapperFactoryBean
Architecture Digest
Architecture Digest
Nov 16, 2023 · Backend Development

Structuring Session‑Based Scene Data with MyBatis in Java

This article explains how to redesign a JSON payload that repeats a sessionId for each scene by moving the sessionId to the outer level and using MyBatis resultMap with a collection to map a Session object containing a list of Scene objects, including Java entity definitions, mapper XML, service, and controller code.

BackendControllerJava
0 likes · 5 min read
Structuring Session‑Based Scene Data with MyBatis in Java
Selected Java Interview Questions
Selected Java Interview Questions
Jul 14, 2023 · Backend Development

Using MapStruct for Efficient Entity Mapping in Java Projects

This article introduces the open‑source MapStruct library, shows how to configure Maven and Lombok dependencies, defines entity and DTO classes with Lombok annotations, creates a mapper interface, and demonstrates simple, list, multi‑source, and default‑value mappings with complete code examples.

Entity MappingJavaLombok
0 likes · 11 min read
Using MapStruct for Efficient Entity Mapping in Java Projects
Java High-Performance Architecture
Java High-Performance Architecture
Apr 22, 2023 · Backend Development

Master Java Entity Mapping with MapStruct: A Complete Guide

This article introduces the open‑source MapStruct library for Java, shows how to configure Maven, defines entity and DTO classes, demonstrates basic and advanced mapping techniques—including list conversion, multi‑object merging, and default values—while providing complete code examples and explanations.

Entity MappingJavamapper
0 likes · 11 min read
Master Java Entity Mapping with MapStruct: A Complete Guide
The Dominant Programmer
The Dominant Programmer
Feb 9, 2023 · Backend Development

Simplify Java Bean Mapping with MapStruct: A Step‑by‑Step Guide

This article explains how to replace repetitive getter/setter code with MapStruct by showing dependency setup, defining source and target classes, creating mapper interfaces with @Mapping annotations, testing the conversion, and handling common integration issues such as Swagger conflicts.

bean-mappingmappermapstruct
0 likes · 6 min read
Simplify Java Bean Mapping with MapStruct: A Step‑by‑Step Guide
Top Architect
Top Architect
Nov 1, 2022 · Backend Development

Deep Dive into MyBatis SQL Execution Process and Custom TypeHandler

This article thoroughly explains how MyBatis binds mapper interfaces to XML files, details the step‑by‑step SQL execution flow—including mapper retrieval, statement preparation, parameter handling, and result mapping—and demonstrates how to create custom typeHandlers for both input parameters and result sets.

JavaMyBatisPersistence
0 likes · 16 min read
Deep Dive into MyBatis SQL Execution Process and Custom TypeHandler
Java High-Performance Architecture
Java High-Performance Architecture
Oct 30, 2022 · Backend Development

Boost Your Java Backend: Master MyBatisCodeHelper Pro for Rapid Code Generation

This guide walks you through installing the MyBatisCodeHelper‑Pro IntelliJ plugin, configuring it to generate Java entity, DAO, mapper and service code, customizing type mappings, creating SQL scripts, and using shortcuts to produce find, update, delete, and pagination methods efficiently for backend development.

BackendCode GenerationIntelliJ
0 likes · 7 min read
Boost Your Java Backend: Master MyBatisCodeHelper Pro for Rapid Code Generation
Top Architect
Top Architect
Jun 20, 2022 · Backend Development

Understanding How MyBatis‑Plus Maps Mapper Methods to SQL Statements and Executes Database Operations

This article provides a detailed walkthrough of MyBatis‑Plus internals, covering the auto‑configuration of SqlSessionFactory, parsing of mapper XML and annotations, registration of mapper interfaces via @MapperScan, creation of dynamic proxies, and the final assembly of executable SQL scripts for database interactions.

JavaSQL MappingSpring Boot
0 likes · 15 min read
Understanding How MyBatis‑Plus Maps Mapper Methods to SQL Statements and Executes Database Operations
High Availability Architecture
High Availability Architecture
Sep 3, 2021 · Backend Development

MyBatis Complete Example and Internal Architecture Overview

This article provides a thorough introduction to MyBatis, including a complete beginner example with database schema, Maven configuration, XML and Java mapper files, and a demo program, followed by an in‑depth explanation of MyBatis’s lifecycle, core components such as SqlSession, Executor, StatementHandler, ParameterHandler, ResultSetHandler, and their interactions.

ExecutorJavaMyBatis
0 likes · 27 min read
MyBatis Complete Example and Internal Architecture Overview
vivo Internet Technology
vivo Internet Technology
Sep 2, 2021 · Backend Development

Complete MyBatis Example and Architecture Overview

The article presents a step‑by‑step MyBatis tutorial that creates a sample user table, adds Maven dependencies, configures MyBatis, defines mapper XML and Java interfaces, demonstrates a test program, and explains core components such as SqlSession, Executor, StatementHandler, ParameterHandler, and ResultSetHandler.

ExecutorJavaMyBatis
0 likes · 28 min read
Complete MyBatis Example and Architecture Overview
vivo Internet Technology
vivo Internet Technology
May 19, 2021 · Backend Development

MyBatis-Plus SQL Auto-Injection Principle Analysis

MyBatis‑Plus enhances MyBatis by automatically injecting CRUD SQL via BaseMapper, using entity annotations and template methods to map classes to tables, eliminating repetitive manual SQL, supporting lambda queries, pagination, and performance tools, all with minimal intrusion and overhead.

BaseMapperJavaMyBatis
0 likes · 10 min read
MyBatis-Plus SQL Auto-Injection Principle Analysis
Architecture Digest
Architecture Digest
Jan 16, 2021 · Backend Development

Understanding MyBatis SQL Execution Process and Custom TypeHandler Implementation

This article explains how MyBatis binds mapper interfaces to XML files, details the step‑by‑step SQL execution flow—including mapper retrieval, statement lookup, parameter handling, and result set mapping—and demonstrates how to create custom TypeHandler classes for both parameter setting and result extraction.

JavaMyBatisSQL Execution
0 likes · 16 min read
Understanding MyBatis SQL Execution Process and Custom TypeHandler Implementation
Code Ape Tech Column
Code Ape Tech Column
Dec 29, 2020 · Backend Development

Unveiling MyBatis: How Mapper Binding and SQL Execution Work Internally

This article dissects MyBatis 3.5.5’s internal workflow, explaining how mapper interfaces bind to XML files, the step‑by‑step SQL execution process, custom typeHandler creation for parameter and result mapping, and the underlying proxy and configuration mechanisms that drive query handling.

BackendJavaMyBatis
0 likes · 17 min read
Unveiling MyBatis: How Mapper Binding and SQL Execution Work Internally
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 24, 2020 · Backend Development

Resolving Duplicate Mapper Bean Warnings in Spring Boot 2.x with MyBatis‑Plus 3.4.1

This article explains why Spring Boot 2.x combined with MyBatis‑Plus 3.4.1 emits duplicate mapper bean warnings, analyzes the root cause in the MyBatis‑Spring integration, and provides a step‑by‑step fix by aligning dependency versions, especially upgrading the pagehelper‑spring‑boot‑starter to 1.3.0.

Duplicate BeanSpring BootVersion Conflict
0 likes · 11 min read
Resolving Duplicate Mapper Bean Warnings in Spring Boot 2.x with MyBatis‑Plus 3.4.1
Architecture Digest
Architecture Digest
Nov 6, 2020 · Backend Development

Custom JDK Dynamic Proxy for MyBatis Automatic Mapper Implementation

This article explains how MyBatis can instantiate a mapper interface without an implementation class by using a custom JDK dynamic proxy (referred to as "投鞭断流") that intercepts method calls, creates result objects, and demonstrates the full source code and execution output.

Backend DevelopmentDynamic ProxyJava
0 likes · 7 min read
Custom JDK Dynamic Proxy for MyBatis Automatic Mapper Implementation
Java Backend Technology
Java Backend Technology
Oct 20, 2020 · Backend Development

Unlocking MyBatis Mapper Magic: Custom JDK Dynamic Proxy Explained

This article explains how a custom JDK dynamic proxy can automatically map interface methods to concrete objects, demonstrates the implementation with a User POJO and UserMapper, shows test output, analyzes MyBatis internal proxy classes, and clarifies why mapper methods cannot be overloaded.

Dynamic ProxyJavaMyBatis
0 likes · 7 min read
Unlocking MyBatis Mapper Magic: Custom JDK Dynamic Proxy Explained
Programmer DD
Programmer DD
Oct 16, 2020 · Backend Development

How Dynamic Proxies Power MyBatis Auto‑Mapper: A Deep Dive into “投鞭断流”

This article explains how Java’s dynamic proxy mechanism, dubbed “投鞭断流”, can be used to implement MyBatis’s automatic mapper functionality, providing step‑by‑step code examples for custom InvocationHandler, proxy creation, and discusses why method overloading is prohibited in mapper interfaces.

Backend DevelopmentDynamic ProxyJava
0 likes · 7 min read
How Dynamic Proxies Power MyBatis Auto‑Mapper: A Deep Dive into “投鞭断流”
Code Ape Tech Column
Code Ape Tech Column
Sep 13, 2020 · Backend Development

Why MyBatis Mapper Methods Cannot Be Overloaded and How to Locate Their Corresponding SQL in XML

This article explains, from source‑code analysis, why MyBatis mapper methods cannot be overloaded, shows the resulting BeanCreationException, walks through the MyBatis‑SpringBoot auto‑configuration that builds SqlSessionFactory, and demonstrates how to trace a mapper method to the exact SQL statement defined in the XML mapping file.

BackendJavaMyBatis
0 likes · 8 min read
Why MyBatis Mapper Methods Cannot Be Overloaded and How to Locate Their Corresponding SQL in XML
Java Backend Technology
Java Backend Technology
Aug 20, 2020 · Backend Development

Unlock MyBatis Mapper Magic with a Custom JDK Dynamic Proxy

This article explains how to create a custom JDK dynamic proxy that automatically maps interface methods to objects, demonstrates the underlying MyBatis mapper implementation, and clarifies why method overloading is prohibited in mapper interfaces.

Dynamic ProxyJavaMyBatis
0 likes · 8 min read
Unlock MyBatis Mapper Magic with a Custom JDK Dynamic Proxy
macrozheng
macrozheng
Jun 21, 2019 · Backend Development

Fix MyBatis Generator XML Append Issue: Overwrite Mapper Files Correctly

This guide explains why MyBatis Generator appends to existing mapper.xml files causing duplicate BaseResultMap errors, and shows how to upgrade to version 1.3.7 and add the UnmergeableXmlMappersPlugin to ensure mapper files are overwritten and the application runs smoothly.

BackendJavaMyBatis
0 likes · 4 min read
Fix MyBatis Generator XML Append Issue: Overwrite Mapper Files Correctly
Java Backend Technology
Java Backend Technology
Sep 7, 2018 · Backend Development

How MyBatis Instantiates Mapper Interfaces with JDK Dynamic Proxies

This article explains how MyBatis uses JDK dynamic proxies—specifically a custom “投鞭断流” approach—to automatically create mapper interface implementations, walks through code examples, analyzes core source files, and clarifies why method overloading is prohibited in mapper interfaces.

Dynamic ProxyJavaMyBatis
0 likes · 5 min read
How MyBatis Instantiates Mapper Interfaces with JDK Dynamic Proxies