Tagged articles
23 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
JavaScript
JavaScript
Jun 5, 2025 · Frontend Development

Why Object Mapping Beats Switch Statements in JavaScript

This article explains how replacing verbose switch or if‑else chains with object mapping in JavaScript reduces code size, improves readability, eliminates break‑statement bugs, and often yields better performance, while also covering advanced scenarios like function mapping and the Map object.

Code OptimizationObject Mappingswitch statement
0 likes · 5 min read
Why Object Mapping Beats Switch Statements in JavaScript
Java Interview Crash Guide
Java Interview Crash Guide
Jul 25, 2024 · Backend Development

Why MapStruct Beats Manual Bean Copying in Java: Performance, Type Safety, and Advanced Features

This article explains the drawbacks of manual property copying and traditional bean utilities, introduces MapStruct as a compile‑time, high‑performance mapper with type‑safety, deep‑copy support, collection handling, and customizable field‑ignoring, and shows practical Maven and Lombok integration examples.

Bean CopyJavaObject Mapping
0 likes · 13 min read
Why MapStruct Beats Manual Bean Copying in Java: Performance, Type Safety, and Advanced Features
macrozheng
macrozheng
Jul 22, 2024 · Backend Development

Mastering MapStruct: Boost Java Object Mapping Beyond BeanUtils

MapStruct is a powerful Java annotation‑based mapper that outperforms BeanUtils by generating compile‑time mapping implementations without reflection, supporting simple, nested, collection, and custom mappings, dependency injection, constants, expressions, and error handling, making object‑DTO conversions efficient and maintainable in Spring Boot projects.

JavaObject MappingSpring Boot
0 likes · 19 min read
Mastering MapStruct: Boost Java Object Mapping Beyond BeanUtils
DaTaobao Tech
DaTaobao Tech
Jun 26, 2024 · Backend Development

Using MapStruct for Efficient Java Bean Mapping

MapStruct is a compile‑time Java bean‑mapping generator that, when added as an annotation processor in Maven, Gradle or an IDE, lets developers define @Mapper interfaces to automatically produce type‑safe, high‑performance implementations—including custom field mappings, nested collections, and lifecycle hooks—thereby eliminating boilerplate code and centralizing mapping logic.

Annotation ProcessorJavaObject Mapping
0 likes · 17 min read
Using MapStruct for Efficient Java Bean Mapping
Java Tech Enthusiast
Java Tech Enthusiast
May 2, 2024 · Backend Development

Why Not to Use Spring BeanUtils for Object Copying and How MapperStruct Improves Performance

Spring’s BeanUtils.copyProperties is error‑prone and slow due to type mismatches, primitive‑wrapper issues, null overwrites and reflection, whereas MapStruct generates compile‑time, type‑safe mapper code that avoids these pitfalls, delivers far better performance, and integrates easily with Maven and Lombok.

BeanUtilsJavaObject Mapping
0 likes · 6 min read
Why Not to Use Spring BeanUtils for Object Copying and How MapperStruct Improves Performance
Selected Java Interview Questions
Selected Java Interview Questions
Apr 29, 2024 · Backend Development

Why Spring BeanUtils.copyProperties Is Discouraged and MapStruct Is Preferred for Java Object Mapping

The article explains the limitations of Spring's BeanUtils.copyProperties—such as type mismatches, null overwriting, and reflection overhead—and demonstrates how MapStruct provides a faster, compile‑time generated alternative for copying properties between Java objects, with usage examples and Maven setup.

BeanUtilsJavaObject Mapping
0 likes · 6 min read
Why Spring BeanUtils.copyProperties Is Discouraged and MapStruct Is Preferred for Java Object Mapping
Java Architect Essentials
Java Architect Essentials
Sep 8, 2023 · Backend Development

Understanding POJO Types (VO, BO, PO, DTO, DO) and Using the Simple Object Copy Plugin for Code Generation

This article explains the different POJO classifications such as VO, BO, PO, DTO, and DO in Java, compares various object‑copy utilities, and demonstrates how the Simple Object Copy IDE plugin can automatically generate conversion methods to improve development efficiency and code quality.

Backend DevelopmentIDE pluginJava
0 likes · 7 min read
Understanding POJO Types (VO, BO, PO, DTO, DO) and Using the Simple Object Copy Plugin for Code Generation
Architecture Digest
Architecture Digest
Aug 29, 2023 · Backend Development

Understanding POJO Types (VO, BO, PO, DTO, DO) and Using the Simple Object Copy Plugin for Java Object Mapping

This article explains the different POJO classifications such as VO, BO, PO, DTO and DO, describes their typical usage scenarios in layered Java applications, and demonstrates how the Simple Object Copy IntelliJ plugin can automatically generate conversion code, comparing it with other mapping tools.

BackendJavaObject Mapping
0 likes · 8 min read
Understanding POJO Types (VO, BO, PO, DTO, DO) and Using the Simple Object Copy Plugin for Java Object Mapping
政采云技术
政采云技术
Jun 20, 2023 · Backend Development

Problems with BeanCopy and Improving Object Mapping Using MapStruct

This article examines the limitations of BeanCopy for Java DTO mapping—such as inheritance handling, recursive copying, lack of complex type support, performance overhead, and opaque assignments—and demonstrates how MapStruct can address these issues with compile‑time generated, type‑safe mappers.

Backend DevelopmentBeanCopyJava
0 likes · 9 min read
Problems with BeanCopy and Improving Object Mapping Using MapStruct
DaTaobao Tech
DaTaobao Tech
Sep 1, 2022 · Backend Development

Why MapStruct Outperforms Spring BeanUtils for Object Mapping

MapStruct dramatically outperforms Spring's BeanUtils for Java object mapping by generating compile-time code that avoids reflection, achieving roughly ten-to-thirty times faster conversions—even across dozens of fields—while requiring only simple PO/Entity definitions and optional @Mapping annotations, making it a superior, low-learning-curve replacement.

BeanUtilsJavaObject Mapping
0 likes · 14 min read
Why MapStruct Outperforms Spring BeanUtils for Object Mapping
Java Architect Essentials
Java Architect Essentials
Jun 29, 2022 · Backend Development

Using MapStruct for Efficient Java Object Mapping and DTO Conversion

This article explains how MapStruct simplifies Java object‑to‑DTO mapping by defining mapping rules, demonstrates various features such as default methods, abstract mappers, multiple parameters, @MappingTarget updates, handling of fields without getters/setters, Spring integration, and custom type conversions with clear code examples.

Code GenerationObject Mappingdto
0 likes · 17 min read
Using MapStruct for Efficient Java Object Mapping and DTO Conversion
Java Architect Essentials
Java Architect Essentials
Jun 23, 2022 · Backend Development

Custom BeanConvertUtils: Simplifying PO/VO/DTO Conversion in Java

This article introduces a custom BeanConvertUtils class that extends BeanUtils to provide concise, lambda‑friendly conversion of single objects and lists between PO, VO, and DTO types, while highlighting BeanUtils limitations, performance impact, and important usage cautions.

Backend DevelopmentBeanUtilsObject Mapping
0 likes · 7 min read
Custom BeanConvertUtils: Simplifying PO/VO/DTO Conversion in Java
Programmer DD
Programmer DD
May 29, 2022 · Backend Development

Mastering MapStruct: Simplify Java DTO Mapping with Real-World Examples

Learn how to efficiently convert between Java entities and DTOs using MapStruct, covering basic mappings, default methods, abstract classes, multiple parameters, update operations, Spring integration, and custom type conversions, with complete code examples and explanations to streamline data transfer in backend applications.

JavaObject MappingSpring Integration
0 likes · 18 min read
Mastering MapStruct: Simplify Java DTO Mapping with Real-World Examples
Java Architect Essentials
Java Architect Essentials
May 9, 2022 · Backend Development

Understanding POJO Types and Using the Simple Object Copy Plugin for Java Object Mapping

This article explains the definitions and typical usage scenarios of various POJO types (VO, BO, PO, DTO, DO) in Java layered architecture, demonstrates how the Simple Object Copy IntelliJ plugin can generate one‑click conversion methods between them, compares it with other mapping tools, and provides installation instructions.

Object Mappingpojo
0 likes · 7 min read
Understanding POJO Types and Using the Simple Object Copy Plugin for Java Object Mapping
Selected Java Interview Questions
Selected Java Interview Questions
Apr 27, 2022 · Backend Development

Using MapStruct for Object Mapping in Java: Basics, Advanced Features and Spring Integration

This article explains how MapStruct, a Java annotation‑processor library, can automatically generate mapper implementations to convert between entities and DTOs, covering basic usage, default methods, abstract classes, multiple source parameters, update operations, handling fields without getters/setters, Spring injection and custom type conversions.

Annotation ProcessorObject Mappingdto
0 likes · 16 min read
Using MapStruct for Object Mapping in Java: Basics, Advanced Features and Spring Integration
Java Architect Essentials
Java Architect Essentials
Apr 13, 2022 · Backend Development

Master Java Object Mapping: VO, BO, DTO, PO with Simple Object Copy

This article explains the different POJO variants—VO, BO, PO, DTO, and DO—describes their typical usage in layered Java applications, introduces the Simple Object Copy IntelliJ plugin for one‑click conversion method generation, compares it with common mapping tools such as MapStruct and BeanUtils, and discusses performance and flexibility advantages.

BeanUtilsCode GenerationIDE plugin
0 likes · 10 min read
Master Java Object Mapping: VO, BO, DTO, PO with Simple Object Copy
macrozheng
macrozheng
Oct 25, 2021 · Backend Development

Master Object Mapping in Java with MapStruct: From Basics to Advanced Techniques

This article introduces MapStruct, a powerful Java annotation‑based object‑mapping library, compares it with BeanUtils, shows how to integrate it into a Spring Boot project, and provides step‑by‑step examples for basic, collection, nested, composite, and advanced mappings including dependency injection, constants, custom processing, and exception handling.

JavaObject MappingSpring Boot
0 likes · 24 min read
Master Object Mapping in Java with MapStruct: From Basics to Advanced Techniques
macrozheng
macrozheng
Jun 5, 2020 · Backend Development

Master Object Mapping in Java with MapStruct: PO ↔ VO, Lists, and Merges

Learn how to efficiently convert between PO, VO, and DTO objects in Java using Spring BeanUtils for identical fields and MapStruct for custom mappings, including single objects, lists, and merging multiple sources, with full Maven setup and generated implementation details.

Backend DevelopmentJavaObject Mapping
0 likes · 7 min read
Master Object Mapping in Java with MapStruct: PO ↔ VO, Lists, and Merges