MapStruct logo

MapStruct

A Java code generator for creating fast and type-safe bean mappings at compile time
5
1
+ 1
0

What is MapStruct?

It is a code generator that greatly simplifies the implementation of mappings between Java bean types based on a convention over configuration approach. The generated mapping code uses plain method invocations and thus is fast, type-safe and easy to understand.
MapStruct is a tool in the Java Tools category of a tech stack.
MapStruct is an open source tool with 2.1K GitHub stars and 342 GitHub forks. Here’s a link to MapStruct's open source repository on GitHub

Who uses MapStruct?

Companies

Developers
4 developers on StackShare have stated that they use MapStruct.

Why developers like MapStruct?

Here’s a list of reasons why companies and developers use MapStruct
Top Reasons
Be the first to leave a pro

MapStruct's Features

  • Mapping (immutable) objects using builders
  • Enhanced and more flexible update method (@MappingTarget) handling
  • Constructor injection for Annotation Based component models
  • Source policy for unmapped source properties (unmappedSourcePolicy)
  • Support for defaultExpression
  • Limit mapping only to explicitly defined mappings
  • Performance improvement of constant / defaultValue primitive to String mappings
  • Warnings for precision loss

MapStruct Alternatives & Comparisons

What are some alternatives to MapStruct?
guava
The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.
RxJava
A library for composing asynchronous and event-based programs by using observable sequences for the Java VM.
Java 8
It is a revolutionary release of the world’s no 1 development platform. It includes a huge upgrade to the Java programming model and a coordinated evolution of the JVM, Java language, and libraries. Java 8 includes features for productivity, ease of use, improved polyglot programming, security and improved performance.
Apache FreeMarker
It is a "template engine"; a generic tool to generate text output (anything from HTML to auto generated source code) based on templates. It's a Java package, a class library for Java programmers.
Thymeleaf
It is a modern server-side Java template engine for both web and standalone environments. It is aimed at creating elegant web code while adding powerful features and retaining prototyping abilities.
See all alternatives

MapStruct's Followers
1 developers follow MapStruct to keep up with related blogs and decisions.
Andrew Danelz