Dozer
Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. (by DozerMapper)
MapStruct
An annotation processor for generating type-safe bean mappers (by mapstruct)
Our great sponsors
Dozer | MapStruct | |
---|---|---|
3 | 23 | |
2,056 | 6,752 | |
0.5% | 1.3% | |
6.6 | 7.8 | |
23 days ago | 3 days ago | |
Java | Java | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Dozer
Posts with mentions or reviews of Dozer.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-09-06.
-
We released a new version of ShapeShift (0.6.0) - A lightweight, modular, performant and extensible object mapping library
Oh man I had a sudden burst of nostalgia for dozer. Used that thing a bunch in the early-mid naughts with great success. I guess object mapping is an evergreen problem…
-
We released a new version of ShapeShift (0.4.0) - A lightweight Kotlin first library for Object Mapping. Would love to hear your thoughts!
Object mapping is not a new concept. Java libraries like mapstruct (https://github.com/mapstruct/mapstruct), dozer (https://github.com/DozerMapper/dozer) and modelmapper (https://github.com/modelmapper/modelmapper) have been doing it for a long time with a large crowd of developers behind them. We just brought it to Kotlin and improved it where we found the need.
MapStruct
Posts with mentions or reviews of MapStruct.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-05-20.
-
Feedback on a new annotation processor api
Done right i can look something like mapstruct for example. But like any other feature you need to get a feeling for when it's a good idea to use it.
-
must known frameworks/libs/tech, every senior java developer must know(?)
You all beat me to MapStruct and Testcontainers. Honorable mention to RxJava, which I use in Desktop apps.
- Ask HN: What are your “scratch own itch” projects?
-
We released a new version of ShapeShift (0.6.0) - A lightweight, modular, performant and extensible object mapping library
Just use MapStruct...
-
We released a new version of ShapeShift (0.4.0) - A lightweight Kotlin first library for Object Mapping. Would love to hear your thoughts!
Object mapping is not a new concept. Java libraries like mapstruct (https://github.com/mapstruct/mapstruct), dozer (https://github.com/DozerMapper/dozer) and modelmapper (https://github.com/modelmapper/modelmapper) have been doing it for a long time with a large crowd of developers behind them. We just brought it to Kotlin and improved it where we found the need.
-
Spring Warehouse - A quest to learn more Java and Spring boot
Also, don't expose your entities, it's insecure, use a pojo and map the classes in your services, use mapstruct to avoid creating the mapper by hand all the time (https://mapstruct.org/)
-
Source generators and a boilerplate code
During my work on different cloud-native applications with a various tech stacks I’ve paid attention to Java’s widely used mapping library MapStruct, where developers define mappings using Java annotations (in C# attributes). The SourceMapper package uses Source Generators and generates objects mappings based on C# attributes actually during coding. Of course, there is widely used .NET Mapper library AutoMapper, but the main difference between tham, that developer can see (and control) mappings in generated code. The package can be installed using Nuget Package Manager:
-
Do you use code generators in your IDEs or some external ones? If so, which ones?
MapStruct and OpenAPI/Swagger
-
Ideas for a Scala 3 MapStruct library?
When building REST services, mapping Entity Models (EM) to Data Transfer Objects (DTOs) has been an annoying problem in Java. Libs like MapStruct exist for this, but it still feels like an hack.
-
Now that records are official, hoping for expanded support from popular libraries and frameworks
MapStruct supports Records so in theory you can just map to/from whatever it is that can't handle records as another POJO. Besides I most of the time recommend mapping hibernate entities do DTOs anyway.
What are some alternatives?
When comparing Dozer and MapStruct you can also consider the following projects:
ModelMapper - Intelligent object mapping
JMapper Framework - Elegance, high performance and robustness all in one java bean mapper
Orika - Simpler, better and faster Java bean mapping framework
Selma - Selma Java bean mapping that compiles
record-builder - Record builder generator for Java records
Jackson JSON Processor - Main Portal page for the Jackson project
Beanmapper - Library for converting from one Java class to a dissimilar Java class with similar names based on the Bean convention
Hibernate - Hibernate's core Object/Relational Mapping functionality