awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
mapstruct avatar

mapstruct/mapstruct

0
View on GitHub↗
7,663 星标·1,029 分支·Java·1 次浏览mapstruct.org↗

Mapstruct

MapStruct is an annotation processor and Java bean mapping framework that automatically generates high-performance data transfer code during the compilation process. It serves as a type-safe data mapper for converting information between different object types, specifically targeting Java beans and records.

The project replaces manual boilerplate code by using Java interfaces as blueprints to generate concrete implementation classes. This approach ensures type safety and minimizes manual getter and setter calls by producing direct method calls during compilation.

The framework handles data transformation across built-in types and includes automated null safety checks. It analyzes nullness annotations to insert guards and assign default values when transferring data between API models and internal entities.

Features

  • Type-Safe Mapper Generators - Creates mapping code between bean types and records at compile time to ensure type safety.
  • Annotation Processing Tooling - Integrates with the Java Annotation Processing Tool to produce implementation classes during the build lifecycle.
  • Java Annotation Processors - Implements a Java annotation processor to generate mapping code during the compilation process.
  • Compile-Time Field Mapping - Resolves field-to-field mapping and type conversions during compilation to avoid runtime reflection.
  • Interface-Driven Design Patterns - Uses Java interfaces as blueprints to automatically generate concrete mapping implementation classes.
  • Type-Safe Data Handling - Creates reliable mapping layers between API models and internal entities while maintaining compile-time type checks.
  • Boilerplate Reduction Patterns - Eliminates the need for manual getter and setter calls by generating mapping logic during compilation.
  • Direct Method Call Generation - Produces plain Java method calls for data transfer to maximize execution speed and type safety.
  • Null Value Validation - Inserts guards and assigns default values by analyzing nullness annotations during data mapping.
  • Null-Aware Code Generation - Analyzes nullness annotations to automatically insert null checks and default value logic into generated methods.
  • Null-Safe Object Mapping - Handles potential null values and default assignments automatically when transferring data between object types.
  • Bean Mapping - Code generator for convention-over-configuration bean mapping.
  • Bean Mapping and Validation - Annotation processor for generating type-safe bean mappers.

Star 历史

mapstruct/mapstruct 的 Star 历史图表mapstruct/mapstruct 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Mapstruct 的开源替代方案

相似的开源项目,按与 Mapstruct 的功能重合度排序。
  • projectlombok/lombokprojectlombok 的头像

    projectlombok/lombok

    13,458在 GitHub 上查看↗

    Lombok is a Java annotation processor and boilerplate reduction library designed to automatically generate repetitive source code. It intercepts the compilation process to inject methods and fields directly into Java classes, acting as a source code generator that eliminates the need to manually write common class patterns. The project distinguishes itself through deep integration with the Java compiler and various integrated development environments. It provides IDE plugins that allow editors to recognize and navigate generated methods, preventing false compilation errors and maintaining syn

    Java
    在 GitHub 上查看↗13,458
  • xebia-france/selmaxebia-france 的头像

    xebia-france/selma

    213在 GitHub 上查看↗

    Selma Java bean mapping that compiles

    Java
    在 GitHub 上查看↗213
  • orika-mapper/orikaorika-mapper 的头像

    orika-mapper/orika

    1,315在 GitHub 上查看↗

    Simpler, better and faster Java bean mapping framework

    Javajavamapper
    在 GitHub 上查看↗1,315
  • google/autogoogle 的头像

    google/auto

    10,545在 GitHub 上查看↗

    This project is a Java annotation processing framework and source code generator designed to automate repetitive boilerplate and reduce manual coding errors. It functions as a toolkit for building custom annotation processors that produce source code, metadata, and type definitions during the compilation process. The framework specifically automates the creation of immutable value types with built-in equality and hashing logic, as well as the generation of factory implementations for dependency injection. It also handles the automated production of service provider configuration files to enab

    Java
    在 GitHub 上查看↗10,545
查看 Mapstruct 的所有 30 个替代方案→

常见问题解答

mapstruct/mapstruct 是做什么的?

MapStruct is an annotation processor and Java bean mapping framework that automatically generates high-performance data transfer code during the compilation process. It serves as a type-safe data mapper for converting information between different object types, specifically targeting Java beans and records.

mapstruct/mapstruct 的主要功能有哪些?

mapstruct/mapstruct 的主要功能包括:Type-Safe Mapper Generators, Annotation Processing Tooling, Java Annotation Processors, Compile-Time Field Mapping, Interface-Driven Design Patterns, Type-Safe Data Handling, Boilerplate Reduction Patterns, Direct Method Call Generation。

mapstruct/mapstruct 有哪些开源替代品?

mapstruct/mapstruct 的开源替代品包括: projectlombok/lombok — Lombok is a Java annotation processor and boilerplate reduction library designed to automatically generate repetitive… xebia-france/selma — Selma Java bean mapping that compiles. orika-mapper/orika — Simpler, better and faster Java bean mapping framework. google/auto — This project is a Java annotation processing framework and source code generator designed to automate repetitive… androidannotations/androidannotations — AndroidAnnotations is a suite of tools designed to automate the generation of repetitive boilerplate and setup code… jakewharton/butterknife — ButterKnife is an Android view binding library and Java annotation processor that automates the linking of UI elements…