Tagged articles
mapper
29 articles · Page 1 of 1
This article compares MyBatis’s fully‑annotation mode and the mixed interface‑plus‑XML mode, outlining their implementation examples, advantages, disadvantages, and providing guidance on selecting the appropriate approach based on project size, query complexity, and team collaboration needs.
JavaXMLannotation
0 likes · 8 min read

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.
DTOMapStructObject Mapping
0 likes · 17 min read

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.
FactoryBeanJavaMyBatis
0 likes · 13 min read

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

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.
DTOEntity MappingJava
0 likes · 11 min read

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 MappingJavaMapStruct
0 likes · 11 min read

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.
MapStructSpringbean-mapping
0 likes · 6 min read

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.
JavaMyBatisSQL
0 likes · 16 min read

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.
BackendDAOIntelliJ
0 likes · 7 min read

This article explains how MyBatis‑Plus maps Mapper interface methods to executable SQL statements, detailing the auto‑configuration of SqlSessionFactory, XML parsing, mapper registration, SQL injection, and the dynamic proxy mechanism used at runtime.
MyBatis PlusORMSQL
0 likes · 15 min read

This article explains how to model a session that contains multiple scenes in a Java backend, defines corresponding entity classes, creates a MyBatis custom mapper with XML result mapping, and implements service and Spring MVC controller layers to expose the data via a clean API.
APIControllerJava
0 likes · 6 min read

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.
JavaMyBatis PlusSQL mapping
0 likes · 15 min read

This article introduces MapStruct, explains its purpose as a compile‑time Java bean mapper, walks through a complete example with Maven dependencies, entity and DTO classes, mapper interfaces, custom mappings, and configuration options, and compares its performance with other copying libraries.
MapStructbean-mappingcode-generation
0 likes · 15 min read

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

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

This article walks through setting up Spring Boot 2.3.11 with MyBatis 3.5.6, covering Maven dependencies, pagination and MyBatis configurations, mapper scanning, CRUD mapper definitions, dynamic SQL providers, and comprehensive unit tests, all illustrated with code snippets and diagrams.
MyBatisPaginationSpring Boot
0 likes · 8 min read

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

This comprehensive guide explains what MyBatis is, its advantages and drawbacks, usage scenarios, differences from Hibernate, key syntax like #{ } vs ${ }, mapping techniques, pagination, caching, lazy loading, batch operations, dynamic SQL, and how to configure mappers and plugins in Java projects.
JavaMyBatisORM
0 likes · 21 min read

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

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

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.
Dependency ManagementDuplicate BeanMyBatis Plus
0 likes · 11 min read

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.
JavaMyBatisReflection
0 likes · 7 min read

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.
JavaMyBatisReflection
0 likes · 7 min read

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.
JavaMyBatisbackend development
0 likes · 7 min read

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

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.
JavaMyBatisdynamic-proxy
0 likes · 8 min read

This article explains the core principle of MyBatis by demonstrating how Mapper interfaces are turned into dynamic proxy objects using JDK proxy mechanisms, walks through manual simulation code, and clarifies each step of the proxy creation and method invocation process.
BackendJDK ProxyJava
0 likes · 7 min read

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

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.
JavaMyBatisdynamic-proxy
0 likes · 5 min read
