Tag

MapStruct

0 views collected around this technical thread.

Cognitive Technology Team
Cognitive Technology Team
Jun 5, 2025 · Backend Development

Why BeanUtils.copyProperties Is a Hidden Performance Killer and What to Use Instead

BeanUtils.copyProperties, a convenient Apache Commons utility for Java bean copying, harbors multiple hidden pitfalls—including reflection overhead, unsafe type conversion, null‑value overwrites, shallow copy issues, and limited depth—so developers should evaluate modern alternatives like MapStruct, Dozer, or manual mapping for better performance and safety.

BeanUtilsJavaMapStruct
0 likes · 7 min read
Why BeanUtils.copyProperties Is a Hidden Performance Killer and What to Use Instead
Architecture Digest
Architecture Digest
May 30, 2025 · Backend Development

MapStruct for Java Bean Mapping: Features, Expressions, QualifiedByName, NullValueMappingStrategy, and Decorator

MapStruct is a compile‑time Java annotation processor that generates type‑safe mapping code, offering concise, high‑performance conversions with features such as expressions, qualifiedByName methods, null‑value strategies, and decorators, illustrated through detailed code examples and usage guidelines.

Bean MappingExpressionJava
0 likes · 7 min read
MapStruct for Java Bean Mapping: Features, Expressions, QualifiedByName, NullValueMappingStrategy, and Decorator
Code Ape Tech Column
Code Ape Tech Column
May 21, 2025 · Backend Development

Advanced MapStruct Usage: expression, qualifiedByName, nullValueMappingStrategy, and Decorator

This article introduces MapStruct, a compile‑time Java bean‑mapping framework, and demonstrates advanced features such as expression‑based mappings, qualifiedByName for custom conversions, nullValueMappingStrategy for handling nulls, and the use of Decorator classes to apply global post‑processing logic.

Bean MappingJavaMapStruct
0 likes · 6 min read
Advanced MapStruct Usage: expression, qualifiedByName, nullValueMappingStrategy, and Decorator
macrozheng
macrozheng
May 20, 2025 · Backend Development

Why Java Records Beat Lombok @Data and How to Simplify Your Code

This article examines the drawbacks of Lombok, demonstrates how replacing Lombok annotations with Java Records and MapStruct improves readability, type safety, and debugging, and shows the concrete benefits of reducing boilerplate and achieving compile‑time safety in Java backend projects.

JavaJava RecordsLombok
0 likes · 6 min read
Why Java Records Beat Lombok @Data and How to Simplify Your Code
Selected Java Interview Questions
Selected Java Interview Questions
Feb 3, 2025 · Backend Development

Advanced MapStruct Usage: Expressions, qualifiedByName, nullValueMappingStrategy, and Decorators

MapStruct is a compile‑time Java annotation processor that automates bean mapping, offering concise, high‑performance, type‑safe conversions, and advanced features such as expression mapping, qualifiedByName methods, null‑value strategies, and decorators, with full IDE support and illustrative code examples.

Annotation ProcessorBean MappingJava
0 likes · 7 min read
Advanced MapStruct Usage: Expressions, qualifiedByName, nullValueMappingStrategy, and Decorators
Architect's Guide
Architect's Guide
Jan 27, 2025 · Backend Development

Advanced MapStruct Techniques: expression, qualifiedByName, nullValueMappingStrategy, and Decorator

This article introduces MapStruct, a compile‑time Java bean mapping framework, and demonstrates advanced features such as expression‑based mappings, qualifiedByName custom converters, nullValueMappingStrategy handling, and decorator‑based post‑processing with concrete code examples for Spring‑based projects.

Bean MappingJavaMapStruct
0 likes · 6 min read
Advanced MapStruct Techniques: expression, qualifiedByName, nullValueMappingStrategy, and Decorator
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 30, 2024 · Backend Development

Which Java Bean Mapping Tool Is Fastest? Spring BeanUtils vs MapStruct vs Others

This article compares the performance of several Java bean‑mapping utilities—including Spring BeanUtils, Apache BeanUtils, Orika, Cglib BeanCopier, ModelMapper, MapStruct, and manual getter/setter code—by converting a sample Entity to a DTO 10,000 times and summarizing the results and best‑use recommendations.

Bean MappingCGLIBDTO
0 likes · 10 min read
Which Java Bean Mapping Tool Is Fastest? Spring BeanUtils vs MapStruct vs Others
macrozheng
macrozheng
Oct 15, 2024 · Backend Development

Master Advanced MapStruct Techniques for Efficient Java Bean Mapping

This article introduces MapStruct, a compile‑time Java bean mapping framework, and walks through its key features, expression mapping, qualifiedByName custom methods, null‑value strategies, and decorator usage, providing code examples for each advanced scenario.

Bean MappingJavaMapStruct
0 likes · 7 min read
Master Advanced MapStruct Techniques for Efficient Java Bean Mapping
Lobster Programming
Lobster Programming
Sep 30, 2024 · Backend Development

Mastering BO, DTO, VO, PO: When and How to Use Java Object Mapping Tools

This article clarifies the purpose of Java classes ending with “O”—BO, DTO, VO, PO—explains their proper usage in a typical front‑end/back‑end workflow, and compares mapping solutions like Spring BeanUtils and MapStruct with code examples.

BODTOJava
0 likes · 6 min read
Mastering BO, DTO, VO, PO: When and How to Use Java Object Mapping Tools
Architecture Digest
Architecture Digest
Sep 22, 2024 · Backend Development

Advanced MapStruct Usage: Expressions, qualifiedByName, NullValueMappingStrategy, and Decorator

This article introduces MapStruct, a compile‑time Java bean‑mapping framework, and demonstrates advanced features such as expression mapping, qualifiedByName for custom conversions, null‑value handling strategies, and the use of decorators to extend mapper behavior, complete with code examples.

Bean MappingJavaMapStruct
0 likes · 7 min read
Advanced MapStruct Usage: Expressions, qualifiedByName, NullValueMappingStrategy, and Decorator
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.

JavaMapStructMaven
0 likes · 19 min read
Mastering MapStruct: Boost Java Object Mapping Beyond BeanUtils
Architect's Tech Stack
Architect's Tech Stack
Jul 22, 2024 · Backend Development

Using MapStruct for Efficient Bean Copying in Java

This article explains why manual property copying in layered Java applications is inefficient, compares runtime copiers like BeanUtils and BeanCopier, and demonstrates how MapStruct provides compile‑time, type‑safe, high‑performance bean mapping with support for deep copy, collection mapping, field ignoring, and Lombok integration.

Bean MappingJavaMapStruct
0 likes · 10 min read
Using MapStruct for Efficient Bean Copying in Java
Java Architect Essentials
Java Architect Essentials
Jul 1, 2024 · Backend Development

Pitfalls of Java Bean Property Copy Tools and Recommended Alternatives

This article explains why generic Java bean property copy utilities like Spring BeanUtils, Apache Commons BeanUtils, and CGLIB can cause runtime type conversion errors and performance issues, demonstrates the problems with code examples, and recommends using custom converters or IDE‑generated mapping code such as MapStruct for safe and efficient object transformation.

BackendBeanUtilsCGLIB
0 likes · 8 min read
Pitfalls of Java Bean Property Copy Tools and Recommended Alternatives
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 ProcessorJavaMapStruct
0 likes · 17 min read
Using MapStruct for Efficient Java Bean Mapping
Selected Java Interview Questions
Selected Java Interview Questions
May 30, 2024 · Backend Development

Understanding DTO, VO, PO and Object Mapping with BeanUtils and MapStruct in Java

This article explains the roles of DTO, VO, and PO in Java applications, compares manual property copying with BeanUtils and MapStruct, provides complete code examples for both approaches, and offers guidance on choosing the appropriate method based on performance and project needs.

BackendBeanUtilsDTO
0 likes · 13 min read
Understanding DTO, VO, PO and Object Mapping with BeanUtils and MapStruct in Java
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.

BeanUtilsJavaMapStruct
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.

BeanUtilsJavaMapStruct
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
Jan 8, 2024 · Backend Development

Using MapStruct for Efficient Java Bean Copying and Mapping

This article explains why manual property copying in Java is inefficient, compares several runtime bean‑copy utilities, and demonstrates how MapStruct provides a compile‑time, type‑safe, high‑performance solution for shallow and deep object mapping, including handling of collections and ignored fields.

Bean MappingCGLIBJava
0 likes · 13 min read
Using MapStruct for Efficient Java Bean Copying and Mapping
Architecture Digest
Architecture Digest
Sep 21, 2023 · Backend Development

Using MapStruct for Efficient Bean Copying in Java Applications

This article explains why manual property copying in layered Java applications is inefficient, compares traditional approaches such as manual setters, Spring BeanUtils, and CGLIB BeanCopier, and demonstrates how MapStruct provides high‑performance, type‑safe, compile‑time generated mappers with support for deep copy, collection mapping, field ignoring, and Lombok integration.

BeanMappingCodeGenerationDeepCopy
0 likes · 10 min read
Using MapStruct for Efficient Bean Copying in Java Applications
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.

DTOEntity MappingJava
0 likes · 11 min read
Using MapStruct for Efficient Entity Mapping in Java Projects