[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4213":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":15,"starSnapshotCount":15,"syncStatus":18,"lastSyncTime":35,"discoverSource":36},4213,"mapstruct","mapstruct\u002Fmapstruct","An annotation processor for generating type-safe bean mappers","https:\u002F\u002Fmapstruct.org\u002F",null,"Java",7661,1028,130,458,0,4,13,2,68.34,"Other",false,"main",true,[25,26,27,28,29,5,30,31],"annotation-processor","bean-mapping","java","javabeans","mapping","no-reflection","records","2026-06-12 04:00:21","# MapStruct - Java bean mappings, the easy way!\n\n[![Latest Stable Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLatest%20Stable%20Version-1.6.3-blue.svg)](https:\u002F\u002Fcentral.sonatype.com\u002Fsearch?q=g:org.mapstruct%20v:1.6.3)\n[![Latest Version](https:\u002F\u002Fimg.shields.io\u002Fmaven-central\u002Fv\u002Forg.mapstruct\u002Fmapstruct-processor.svg?maxAge=3600&label=Latest%20Release)](https:\u002F\u002Fcentral.sonatype.com\u002Fsearch?q=g:org.mapstruct)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-yellowgreen.svg)](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Fblob\u002Fmain\u002FLICENSE.txt)\n\n[![Build Status](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Fworkflows\u002FCI\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Factions?query=branch%3Amain+workflow%3ACI)\n[![Coverage Status](https:\u002F\u002Fimg.shields.io\u002Fcodecov\u002Fc\u002Fgithub\u002Fmapstruct\u002Fmapstruct.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmapstruct\u002Fmapstruct\u002Ftree\u002Fmain)\n\n* [What is MapStruct?](#what-is-mapstruct)\n* [Requirements](#requirements)\n* [Using MapStruct](#using-mapstruct)\n * [Maven](#maven)\n * [Gradle](#gradle)\n* [Documentation and getting help](#documentation-and-getting-help)\n* [Building from Source](#building-from-source)\n* [Links](#links)\n* [Licensing](#licensing)\n\n## What is MapStruct?\n\nMapStruct is a Java [annotation processor](https:\u002F\u002Fdocs.oracle.com\u002Fen\u002Fjava\u002Fjavase\u002F21\u002Fdocs\u002Fspecs\u002Fman\u002Fjavac.html#annotation-processing) designed to generate type-safe and high-performance mappers for Java bean classes, including support for Java 16+ records.\nBy automating the creation of mappings, MapStruct eliminates the need for tedious and error-prone manual coding. \nThe generator provides sensible defaults and built-in type conversions, allowing it to handle standard mappings effortlessly, while also offering flexibility for custom configurations or specialized mapping behaviors.\nWith seamless integration into modern Java projects, MapStruct can map between conventional beans, records, and even complex hierarchies, making it an adaptable tool for diverse Java applications.\n\nCompared to mapping frameworks working at runtime, MapStruct offers the following advantages:\n\n* **Fast execution** by using plain method invocations instead of reflection\n* **Compile-time type safety**. Only objects and attributes mapping to each other can be mapped, so there's no accidental mapping of an order entity into a customer DTO, etc.\n* **Self-contained code**—no runtime dependencies\n* **Clear error reports** at build time if:\n  * mappings are incomplete (not all target properties are mapped)\n  * mappings are incorrect (cannot find a proper mapping method or type conversion)\n* **Easily debuggable mapping code** (or editable by hand—e.g. in case of a bug in the generator)\n\nTo create a mapping between two types, declare a mapper interface like this:\n\n```java\n@Mapper\npublic interface CarMapper {\n\n    CarMapper INSTANCE = Mappers.getMapper( CarMapper.class );\n\n    @Mapping(target = \"seatCount\", source = \"numberOfSeats\")\n    CarDto carToCarDto(Car car);\n}\n```\n\nAt compile time MapStruct will generate an implementation of this interface. The generated implementation uses plain Java method invocations for mapping between source and target objects, i.e. no reflection is involved. By default, properties are mapped if they have the same name in source and target, but you can control this and many other aspects using `@Mapping` and a handful of other annotations.\n\n## Requirements\n\nMapStruct requires Java 1.8 or later.\n\n## Using MapStruct\n\nMapStruct works in command line builds (plain javac, via Maven, Gradle, Ant, etc.) and IDEs.\n\nFor Eclipse, a dedicated plug-in is in development (see https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct-eclipse). It goes beyond what's possible with an annotation processor, providing content assist for annotation attributes, quick fixes and more.\n\nFor IntelliJ the plug-in is available within the IntelliJ marketplace (see https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F10036-mapstruct-support).\n\n### Maven\n\nFor Maven-based projects, add the following to your POM file in order to use MapStruct (the dependencies are available at Maven Central):\n\n```xml\n...\n\u003Cproperties>\n    \u003Corg.mapstruct.version>1.6.3\u003C\u002Forg.mapstruct.version>\n\u003C\u002Fproperties>\n...\n\u003Cdependencies>\n    \u003Cdependency>\n        \u003CgroupId>org.mapstruct\u003C\u002FgroupId>\n        \u003CartifactId>mapstruct\u003C\u002FartifactId>\n        \u003Cversion>${org.mapstruct.version}\u003C\u002Fversion>\n    \u003C\u002Fdependency>\n\u003C\u002Fdependencies>\n...\n\u003Cbuild>\n    \u003Cplugins>\n        \u003Cplugin>\n            \u003CgroupId>org.apache.maven.plugins\u003C\u002FgroupId>\n            \u003CartifactId>maven-compiler-plugin\u003C\u002FartifactId>\n            \u003Cversion>3.13.0\u003C\u002Fversion>\n            \u003Cconfiguration>\n                \u003Csource>17\u003C\u002Fsource>\n                \u003Ctarget>17\u003C\u002Ftarget>\n                \u003CannotationProcessorPaths>\n                    \u003Cpath>\n                        \u003CgroupId>org.mapstruct\u003C\u002FgroupId>\n                        \u003CartifactId>mapstruct-processor\u003C\u002FartifactId>\n                        \u003Cversion>${org.mapstruct.version}\u003C\u002Fversion>\n                    \u003C\u002Fpath>\n                \u003C\u002FannotationProcessorPaths>\n            \u003C\u002Fconfiguration>\n        \u003C\u002Fplugin>\n    \u003C\u002Fplugins>\n\u003C\u002Fbuild>\n...\n```\n\n### Gradle\n\nFor Gradle, you need something along the following lines:\n\n```groovy\nplugins {\n    ...\n    id \"com.diffplug.eclipse.apt\" version \"3.26.0\" \u002F\u002F Only for Eclipse\n}\n\ndependencies {\n    ...\n    implementation 'org.mapstruct:mapstruct:1.6.3'\n\n    annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'\n    testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3' \u002F\u002F if you are using mapstruct in test code\n}\n...\n```\n\nIf you don't work with a dependency management tool, you can obtain a distribution bundle from [Releases page](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Freleases).\n\n## Documentation and getting help\n\nTo learn more about MapStruct, refer to the [project homepage](https:\u002F\u002Fmapstruct.org). The [reference documentation](https:\u002F\u002Fmapstruct.org\u002Fdocumentation\u002Freference-guide\u002F) covers all provided functionality in detail. If you need help please ask it in the [Discussions](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Fdiscussions).\n\n## Building from Source\n\nMapStruct uses Maven for its build. Java 21 is required for building MapStruct from source.\nTo build the complete project, run\n\n    .\u002Fmvnw clean install\n\nfrom the root of the project directory. To skip the distribution module, run \n\n    .\u002Fmvnw clean install -DskipDistribution=true\n    \n## Importing into IDE\n\nMapStruct uses the gem annotation processor to generate mapping gems for its own annotations.\nTherefore, for seamless integration within an IDE annotation processing needs to be enabled.\n\n### IntelliJ \n\nMake sure that you have at least IntelliJ 2018.2.x (needed since support for `annotationProcessors` from the `maven-compiler-plugin` is from that version).\nEnable annotation processing in IntelliJ (Build, Execution, Deployment -> Compiler -> Annotation Processors)\n\n### Eclipse\n\nMake sure that you have the [m2e_apt](https:\u002F\u002Fmarketplace.eclipse.org\u002Fcontent\u002Fm2e-apt) plugin installed.\n\n## Links\n\n* [Homepage](https:\u002F\u002Fmapstruct.org)\n* [Source code](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002F)\n* [Downloads](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Freleases)\n* [Issue tracker](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Fissues)\n* [User group](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F?hl=en#!forum\u002Fmapstruct-users)\n* [CI build](https:\u002F\u002Fgithub.com\u002Fmapstruct\u002Fmapstruct\u002Factions\u002F)\n\n## Licensing\n\nMapStruct is licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this project except in compliance with the License. You may obtain a copy of the License at https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0.\n","MapStruct 是一个用于生成类型安全的 Java Bean 映射器的注解处理器。其核心功能包括自动生成高性能的映射代码，支持常规 Java Bean 以及 Java 16+ 的记录类型，并且提供默认配置和内置类型转换，同时也允许开发者进行定制化配置以满足特定需求。相比运行时映射框架，MapStruct 通过使用直接方法调用而非反射来提高执行效率，确保编译时类型安全，不依赖任何运行时库，并能在构建阶段清晰地报告错误，方便调试。适用于需要高效、安全地在不同数据结构之间进行转换的各种 Java 应用场景中。","2026-06-11 02:59:04","top_language"]