An intelligent Java library that automatically maps objects to each other using a convention-based approach.
ModelMapper is a Java library that automatically maps data between objects, such as from domain models to DTOs or between different API layers. It uses intelligent conventions to match properties by name and type, eliminating the need for repetitive manual mapping code. The library solves the common problem of writing and maintaining boilerplate mapping logic in Java applications.
Java developers building applications with layered architectures, such as Spring Boot or Jakarta EE projects, where data needs to be transformed between entities, DTOs, and view models.
Developers choose ModelMapper for its balance of automatic convention-based mapping and a refactoring-safe API for customizations, reducing development time while maintaining type safety and flexibility.
Intelligent object mapping
Maps properties with matching names and types automatically, eliminating boilerplate code for common cases as highlighted in the key features.
Provides a refactoring-safe API for custom mappings, ensuring type safety and resilience to code changes during development.
Supports custom property mappings, converters, and conditionals, allowing developers to handle complex scenarios when conventions fall short.
Offers optional modules for Java 8 features, Records, Protocol Buffers, and Vavr, enabling easy integration with modern Java libraries and technologies.
Relies on reflection for automatic mapping, which can introduce performance overhead compared to compile-time alternatives like MapStruct, especially in high-throughput applications.
Advanced integrations, such as with Protocol Buffers or Records, require separate modules and additional registration steps, adding complexity to the initial setup.
Convention-based mapping can lead to subtle bugs if property names or types are misaligned, necessitating thorough testing and validation to ensure correctness.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.