Tagged articles
62 articles
Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 17, 2026 · Backend Development

8 Must‑Use Spring Boot Code Snippets to Stop Re‑inventing the Wheel

This article presents eight ready‑to‑use Spring Boot 3.5.0 code snippets—including MapStruct converters, embeddable collections, i18n helpers, secure random generators, custom runtime exceptions, type‑safe configuration properties, JPA auditing, and custom validation annotations—each illustrated with concrete examples and runnable code.

Spring Bootconfiguration-propertiescustom-exception
0 likes · 13 min read
8 Must‑Use Spring Boot Code Snippets to Stop Re‑inventing the Wheel
macrozheng
macrozheng
Nov 5, 2025 · Backend Development

Why Java Records Outshine Lombok @Data: A Practical Migration Guide

This article examines the drawbacks of using Lombok in Java projects, demonstrates how replacing Lombok annotations with Java Records, explicit constructors, and MapStruct improves code readability, IDE support, and runtime safety, and shares the measurable benefits of the migration.

Code RefactoringLombokbackend-development
0 likes · 5 min read
Why Java Records Outshine Lombok @Data: A Practical Migration Guide
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
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.

BeanUtilsbackend-developmentdeep copy
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.

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

Decoratorbackend-developmentbean-mapping
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.

Code RefactoringJava RecordsLombok
0 likes · 6 min read
Why Java Records Beat Lombok @Data and How to Simplify Your Code
Programmer DD
Programmer DD
May 17, 2025 · Backend Development

Why Java Records Beat Lombok @Data: A Practical Migration Guide

This article examines the drawbacks of Lombok—such as reduced readability, IDE instability, and debugging challenges—and demonstrates how replacing Lombok annotations with Java Records, explicit constructors, and MapStruct for mapping yields cleaner, type‑safe, and maintainable code while eliminating boilerplate.

Java RecordsLombokcode-generation
0 likes · 5 min read
Why Java Records Beat Lombok @Data: A Practical Migration Guide
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 Processorbackend-developmentbean-mapping
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.

Annotation Processingbean-mappingjava
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.

Performance TestSpring Bootbean-mapping
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.

Annotation Processingbean-mappingcode-generation
0 likes · 7 min read
Master Advanced MapStruct Techniques for Efficient Java Bean Mapping
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.

Decoratorbackend-developmentbean-mapping
0 likes · 7 min read
Advanced MapStruct Usage: Expressions, qualifiedByName, NullValueMappingStrategy, and Decorator
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 CopyObject Mappingjava
0 likes · 13 min read
Why MapStruct Beats Manual Bean Copying in Java: Performance, Type Safety, and Advanced Features
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.

backend-developmentbean-mappingcode-generation
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.

BackendBeanUtilsPropertyCopy
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 ProcessorObject Mappingjava
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.

BeanUtilsObject MappingReflection
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.

BeanUtilsObject Mappingjava
0 likes · 6 min read
Why Spring BeanUtils.copyProperties Is Discouraged and MapStruct Is Preferred for Java Object Mapping
JD Cloud Developers
JD Cloud Developers
Mar 21, 2024 · Backend Development

Why BeanUtils.copyProperties Causes ClassCastException and How to Fix It

A Java backend debugging story explains how using BeanUtils.copyProperties led to a ClassCastException when a HashMap was cast to a custom class, details the investigation steps, shows the problematic code, and presents a manual assignment solution plus recommendations for safer mapping tools.

BeanUtilsClassCastExceptionCopyProperties
0 likes · 4 min read
Why BeanUtils.copyProperties Causes ClassCastException and How to Fix It
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.

Object Copybean-mappingcglib
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.

Entity MappingLombokdto
0 likes · 11 min read
Using MapStruct for Efficient Entity Mapping in Java Projects
政采云技术
政采云技术
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.

BeanCopyObject Mappingbackend-development
0 likes · 9 min read
Problems with BeanCopy and Improving Object Mapping Using MapStruct
Top Architect
Top Architect
Jun 13, 2023 · Backend Development

MapStruct Tutorial: Introduction, Setup, and Advanced Usage

This article introduces MapStruct, explains the challenges of JavaBean conversion, shows how to add dependencies, define POJOs and DTOs, create mapper interfaces with @Mapper, demonstrates basic and advanced mapping scenarios—including custom methods, nested objects, and dependency injection—while highlighting its performance and debugging benefits.

Annotation Processorbackend-developmentbean-mapping
0 likes · 17 min read
MapStruct Tutorial: Introduction, Setup, and Advanced Usage
Java Architect Essentials
Java Architect Essentials
Jun 4, 2023 · Backend Development

MapStruct Tutorial: Introduction, Setup, and Advanced Usage

This article introduces MapStruct, explains why JavaBean conversion is challenging, shows how to add Maven dependencies, define POJOs and DTOs, create mapper interfaces, run tests, and explores its performance benefits, simple usage, debugging advantages, and advanced features such as custom mappings, multi‑source mapping, bean updates, and integration with dependency injection.

Annotation Processorbean-mappingcode-generation
0 likes · 16 min read
MapStruct Tutorial: Introduction, Setup, and Advanced Usage
macrozheng
macrozheng
May 19, 2023 · Backend Development

Why Upgrading Hutool Can Break Bean Copy and Safer Alternatives

Upgrading the Hutool library from 5.7.2 to 5.8.8 caused unexpected BeanUtil.copyProperties failures due to new validation logic, prompting a detailed analysis of the issue and a comparison of safer object‑mapping approaches such as explicit getters/setters, ModelMapper, and MapStruct.

BeanCopyModelMapperhutool
0 likes · 6 min read
Why Upgrading Hutool Can Break Bean Copy and Safer Alternatives
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
Su San Talks Tech
Su San Talks Tech
Apr 3, 2023 · Backend Development

Mastering MapStruct: Fast, Type‑Safe Java Bean Mapping with Real‑World Examples

This article introduces MapStruct, a compile‑time Java bean‑mapping code generator, explains its core concepts, shows step‑by‑step examples—including Maven dependencies, entity and DTO definitions, mapper interfaces, custom conversions, and advanced configurations—while comparing its performance to other copy utilities and highlighting deep‑copy behavior.

bean-mappingcode-generationjava
0 likes · 13 min read
Mastering MapStruct: Fast, Type‑Safe Java Bean Mapping with Real‑World Examples
Java Architect Essentials
Java Architect Essentials
Mar 6, 2023 · Backend Development

Why Property Copy Tools in Java Are Risky: Performance Issues and Safer Alternatives

The article explains why using automatic property copy utilities in Java can lead to performance degradation, hidden type‑conversion bugs, and runtime errors, and demonstrates safer approaches such as manually written converters, IDE‑generated code, and MapStruct with concrete examples and code snippets.

BeanUtilsmapstructperformance
0 likes · 8 min read
Why Property Copy Tools in Java Are Risky: Performance Issues and Safer Alternatives
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
Java Backend Technology
Java Backend Technology
Jan 5, 2023 · Backend Development

Why Java Bean Property Copy Tools Can Hide Dangerous Type Bugs

This article explains why using automatic property copy utilities like Spring BeanUtils, CGLIB BeanCopier, or MapStruct can lead to hidden type conversion errors in Java, compares their performance, demonstrates pitfalls with generic type erasure, and recommends writing explicit conversion classes to avoid runtime bugs.

BeanUtilsProperty MappingType Safety
0 likes · 9 min read
Why Java Bean Property Copy Tools Can Hide Dangerous Type Bugs
DaTaobao Tech
DaTaobao Tech
Oct 25, 2022 · Backend Development

MapStruct and Lombok Integration: Maven Dependency Order and Advanced Usage

The article explains that when using MapStruct with Lombok, Maven must list Lombok before MapStruct (or define annotationProcessorPaths) so Lombok’s annotation processor runs first, and then demonstrates basic and advanced mapping techniques, Spring integration, and singleton caching strategies.

Annotation ProcessingLombokjava
0 likes · 17 min read
MapStruct and Lombok Integration: Maven Dependency Order and Advanced Usage
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.

BeanUtilsObject Mappingjava
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.

Object Mappingcode-generationdto
0 likes · 17 min read
Using MapStruct for Efficient Java Object Mapping and DTO Conversion
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.

Object MappingSpring Integrationdto
0 likes · 18 min read
Mastering MapStruct: Simplify Java DTO Mapping with Real-World Examples
Programmer DD
Programmer DD
Apr 29, 2022 · Backend Development

Simplify Bean Mapping with MapStruct Spring Extensions and ConversionService

This article introduces MapStruct’s new Spring extension, shows how to replace manual BeanUtil conversions with generated mappers, explains the Spring Converter interface, and demonstrates custom configuration and integration with ConversionService for seamless DTO/VO/PO transformations in Java backend projects.

ConversionServicebean-mappingjava
0 likes · 8 min read
Simplify Bean Mapping with MapStruct Spring Extensions and ConversionService
macrozheng
macrozheng
Apr 29, 2022 · Backend Development

Boost Spring Apps with MapStruct: Seamless Conversion Service Integration

This article explains how to replace manual BeanUtil mapping with MapStruct, leverage Spring's Converter interface, and use the MapStruct Spring Extensions plugin to automatically register mappers with ConversionService, including custom adapter configuration and integration of built‑in Spring converters.

ConversionServicebackend-developmentcode-generation
0 likes · 8 min read
Boost Spring Apps with MapStruct: Seamless Conversion Service Integration
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.

BeanUtilsIDE pluginObject Mapping
0 likes · 10 min read
Master Java Object Mapping: VO, BO, DTO, PO with Simple Object Copy
Java Backend Technology
Java Backend Technology
Apr 12, 2022 · Backend Development

Which Java Bean Mapper Is Fastest? 12 Conversion Tools Compared and Ranked

This article evaluates twelve Java object‑property mapping libraries—including MapStruct, ModelMapper, Dozer, and BeanUtils—by measuring their performance across 100 to one‑million conversions, presenting code examples, rating each tool, and recommending the most efficient solution for backend development.

Object Conversionbean-mappingjava
0 likes · 12 min read
Which Java Bean Mapper Is Fastest? 12 Conversion Tools Compared and Ranked
Selected Java Interview Questions
Selected Java Interview Questions
Feb 15, 2022 · Backend Development

Pitfalls of Java Property Copy Tools and Recommendations for Safe Bean Mapping

This article examines the performance drawbacks and hidden type‑conversion issues of common Java property‑copy utilities such as Spring BeanUtils, CGLIB BeanCopier, and MapStruct, demonstrates concrete code examples, and recommends using explicit conversion classes or IDE‑generated getters/setters to avoid runtime errors.

BeanUtilsPropertyCopyjava
0 likes · 9 min read
Pitfalls of Java Property Copy Tools and Recommendations for Safe Bean Mapping
Su San Talks Tech
Su San Talks Tech
Nov 24, 2021 · Backend Development

Boost Java Productivity: 4 Must‑Use Open‑Source Libraries (MapStruct, Retrofit, Faker, Wiremock)

This article introduces four essential Java open‑source libraries—MapStruct, Retrofit, Faker, and Wiremock—explaining their purposes, advantages over traditional approaches, and providing concise code examples to help developers streamline object mapping, HTTP communication, test data generation, and service mocking.

FakerOpen-sourceRetrofit
0 likes · 12 min read
Boost Java Productivity: 4 Must‑Use Open‑Source Libraries (MapStruct, Retrofit, Faker, Wiremock)
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.

Object MappingSpring Bootdto
0 likes · 24 min read
Master Object Mapping in Java with MapStruct: From Basics to Advanced Techniques
Programmer DD
Programmer DD
Oct 4, 2021 · Backend Development

Simplify Java Bean Mapping with MapStruct: A Practical Guide

This article introduces the open‑source MapStruct library for Java, shows how to configure Maven and Lombok, provides step‑by‑step code examples for basic and advanced entity‑to‑DTO mappings—including list conversions, multi‑object mappings, and default values—so developers can replace boilerplate conversion code with clean, type‑safe mappings.

Lombokbackend-developmentbean-mapping
0 likes · 10 min read
Simplify Java Bean Mapping with MapStruct: A Practical Guide
Java Captain
Java Captain
Sep 21, 2021 · Backend Development

Using MapStruct for Efficient Entity‑DTO Mapping in Java

This article introduces the open‑source MapStruct library for Java, showing how to configure Maven dependencies, define entity and DTO classes with Lombok, create mapper interfaces, and perform simple and advanced object conversions such as list mapping, multi‑object merging, and default value handling.

Entity MappingLombokjava
0 likes · 9 min read
Using MapStruct for Efficient Entity‑DTO Mapping in Java
Top Architect
Top Architect
Jun 6, 2021 · Backend Development

Pitfalls of Java Property Copy Utilities and Safer Alternatives

This article examines the drawbacks of using Java property copy utilities such as Spring BeanUtils, CGLIB BeanCopier, and Apache Commons BeanUtils, demonstrates type‑conversion errors through code examples, compares their performance, and recommends defining explicit conversion classes or using MapStruct for safer, compile‑time‑checked mappings.

BeanUtilscglibjava
0 likes · 7 min read
Pitfalls of Java Property Copy Utilities and Safer Alternatives
Java Backend Technology
Java Backend Technology
May 16, 2021 · Backend Development

Why Java Bean Property Copy Tools Can Break Your Code: Hidden Type Issues

This article examines the pitfalls of Java property‑copy utilities such as Spring BeanUtils, CGLIB BeanCopier, and MapStruct, demonstrating performance drawbacks and runtime type‑conversion errors through concrete examples, and recommends defining explicit conversion classes or using IDE‑generated code to avoid hidden bugs.

BeanUtilsjavamapstruct
0 likes · 9 min read
Why Java Bean Property Copy Tools Can Break Your Code: Hidden Type Issues
Java Captain
Java Captain
Apr 28, 2021 · Backend Development

Pitfalls of Using Property Copy Tools in Java and Recommended Practices

This article explains why using generic property copy utilities like Apache Commons BeanUtils, Spring BeanUtils, CGLIB BeanCopier, or MapStruct can lead to performance degradation, type‑conversion errors, and hidden bugs in Java applications, and recommends defining explicit conversion classes with IDE‑generated getters and setters for safer, compile‑time‑checked mappings.

BeanUtilsProperty Mappingcglib
0 likes · 9 min read
Pitfalls of Using Property Copy Tools in Java and Recommended Practices
Code Ape Tech Column
Code Ape Tech Column
Apr 26, 2021 · Backend Development

Why Bean Property Copy Tools Can Fail: Pitfalls, Performance, and Safer Alternatives

This article examines the hidden risks and performance drawbacks of Java bean property copy utilities such as Spring BeanUtils, CGLIB BeanCopier, and MapStruct, demonstrates concrete examples of type‑conversion errors, and recommends custom converters or IDE‑generated mapping code for reliable data transfer.

BeanUtilsProperty MappingType Safety
0 likes · 9 min read
Why Bean Property Copy Tools Can Fail: Pitfalls, Performance, and Safer Alternatives
Code Ape Tech Column
Code Ape Tech Column
Jan 13, 2021 · Backend Development

Getting Started with MapStruct: High‑Performance Java Bean Mapping

This article introduces MapStruct, explains why traditional JavaBean conversion methods like reflection are inefficient, shows how to set up Maven dependencies, define entities and DTOs, write mapper interfaces, run tests, and highlights the performance, debugging, simplicity, and dependency‑free advantages of the generated code.

Annotation Processorbean-mappingjava
0 likes · 8 min read
Getting Started with MapStruct: High‑Performance Java Bean Mapping
Selected Java Interview Questions
Selected Java Interview Questions
Jan 10, 2021 · Backend Development

Introduction to MapStruct: What It Is, How to Use It, and Its Advantages

This article introduces MapStruct, a type‑safe, high‑performance, dependency‑free Java bean mapping annotation processor, explains the problems with manual and reflection‑based conversions, provides step‑by‑step Maven setup, entity/DTO definitions, mapper interface, and a JUnit test, and discusses its performance, debugging, and simplicity advantages.

Annotation Processorbean-mappingjava
0 likes · 9 min read
Introduction to MapStruct: What It Is, How to Use It, and Its Advantages
macrozheng
macrozheng
Nov 18, 2020 · Backend Development

Why MapStruct Is the Fastest Java Bean Mapper and How to Use It

This article introduces MapStruct, a compile‑time Java bean‑mapping framework, explains why it outperforms other mappers, shows how to configure Maven, define mapper interfaces, handle custom field mappings, and demonstrates its impressive runtime performance with practical code examples.

bean-mappingcode-generationjava
0 likes · 13 min read
Why MapStruct Is the Fastest Java Bean Mapper and How to Use It
Java Backend Technology
Java Backend Technology
Sep 8, 2020 · Backend Development

Master Bean Mapping with MapStruct: From PO to VO Made Easy

This article introduces MapStruct, a Java annotation‑processor that automatically generates bean‑mapping code, compares it with manual setters and Spring/Apache BeanUtils, and demonstrates how to handle property name differences, collections, type conversions, and multi‑source mappings through clear examples and code snippets.

Annotation Processorbean-mappingcode-generation
0 likes · 11 min read
Master Bean Mapping with MapStruct: From PO to VO Made Easy
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.

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