{"id":13604571,"url":"https://github.com/mapstruct/mapstruct-examples","last_synced_at":"2025-12-27T13:58:00.541Z","repository":{"id":9377296,"uuid":"11235473","full_name":"mapstruct/mapstruct-examples","owner":"mapstruct","description":"Examples for using MapStruct","archived":false,"fork":false,"pushed_at":"2024-08-18T10:14:15.000Z","size":837,"stargazers_count":1291,"open_issues_count":31,"forks_count":508,"subscribers_count":46,"default_branch":"main","last_synced_at":"2024-10-24T17:53:16.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapstruct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-07T15:38:42.000Z","updated_at":"2024-10-23T06:17:09.000Z","dependencies_parsed_at":"2023-01-11T20:12:02.784Z","dependency_job_id":"fd2bbcba-2532-4742-9a5e-3693982a4997","html_url":"https://github.com/mapstruct/mapstruct-examples","commit_stats":{"total_commits":143,"total_committers":25,"mean_commits":5.72,"dds":0.5524475524475525,"last_synced_commit":"b7041df719da3b9e9c5f6304dcac9d9d7e7938a8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapstruct%2Fmapstruct-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapstruct%2Fmapstruct-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapstruct%2Fmapstruct-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapstruct%2Fmapstruct-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapstruct","download_url":"https://codeload.github.com/mapstruct/mapstruct-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506901,"owners_count":21115503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:00:48.262Z","updated_at":"2025-12-27T13:58:00.523Z","avatar_url":"https://github.com/mapstruct.png","language":"Java","funding_links":[],"categories":["Java","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# MapStruct Examples\n\nThis repository contains examples showing how to use [MapStruct](http://mapstruct.org/), a Java annotation processor for the generation of type-safe bean mapping classes.\n\nCurrently, the following examples exist:\n\n* [_mapstruct-on-ant_](mapstruct-on-ant): Shows how to use MapStruct in Ant-based projects; to build this example, run `ant build` on the command line\n* [_mapstruct-on-gradle_](mapstruct-on-gradle): Shows how to use MapStruct in Gradle-based projects; to build the example project, run `./gradlew clean build` on the command line\n* [_mapstruct-on-bazel_](mapstruct-on-bazel): Shows how to use MapStruct in Bazel-based projects; to build the example project, run `bazel build //...` on the command line, to test the project, run `bazel test //...`.\n* [_mapstruct-lombok_](mapstruct-lombok): Shows how to use MapStruct together with Lombok (with both a Maven `pom.xml` and a Gradle `build.gradle`); to build the example project, run either `mvn clean install` or `./gradlew clean build` on the command line\n* [_mapstruct-iterable-non-iterable_](mapstruct-iterable-to-non-iterable): Shows how by means of a mapper util class conversions can be made from an iterable- to its non-iterable element\n* [_mapstruct-mapping-from-map_](mapstruct-mapping-from-map): Shows how by means of a mapper util class and qualifiers extracting value can be carried out on Maps. Watch [mapstruct/mapstruct#1075](https://github.com/mapstruct/mapstruct/issues/1075) for native support.\n* [_mapstruct-rounding_](mapstruct-rounding): Shows how by means of a mapper util class and qualifiers roundings can be carried out on Numbers\n* [_mapstruct-updatemethods_](mapstruct-updatemethods-1): Shows how to update an existing target object\n* [_mapstruct-field-mapping_](mapstruct-field-mapping): Shows how MapStruct can be used with \"struct\" like objects with public fields\n* [_mapstruct-nested-bean-mappings_](mapstruct-nested-bean-mappings): Shows how to map object graphs via a main root method\n* [_mapstruct-mapping-with-cycles_](mapstruct-nested-bean-mappings): Shows how to map object graphs that can contain cycles\n* [_mapstruct-spi-accessor-naming_](mapstruct-spi-accessor-naming): Example on how to use the Service Provider Interface (SPI) for a custom accessor naming strategy.\n* [_mapstruct-protobuf3_](mapstruct-protobuf3): Example on how to use protobuf3 with MapStruct\n* [_mapstruct-kotlin_](mapstruct-kotlin): Example on how to use MapStruct with Kotlin using KAPT (Kotlin Annotation Processing Tool)\n* [_mapstruct-kotlin-gradle_](mapstruct-kotlin-gradle): Example on how to use MapStruct with Kotlin and Gradle Kotlin DSL using KAPT\n* [_mapstruct-jpa-child-parent_](mapstruct-jpa-child-parent): Example on how to use @Context in relation to parent / child relations in JPA)\n* [_mapstruct-suppress-unmapped_](mapstruct-suppress-unmapped): Shows how mapping to target properties can be ignored without warning by default in a mixed scenario. However bean property mappings that have the same name will still be applied.\n* [_mapstruct-lookup-entity-with-id_](mapstruct-lookup-entity-with-id): Shows how an object with composite key can be read from the database in a mapping method.\n* [_mapstruct-clone_](mapstruct-clone): Shows how an object can be deeply cloned by defining all mapping methods.\n* [_mapstruct-metadata-annotations_](mapstruct-metadata-with-annotations): Demonstrates how to read annotations and use them as mapping instruction.\n* [_mapstruct-mappers-repo_](mapstruct-mapper-repo): Demonstrates how one can build a repo of mappers by means of code generation.\n\n## License\n\nThe examples in this project are licensed under the Apache License, Version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapstruct%2Fmapstruct-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapstruct%2Fmapstruct-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapstruct%2Fmapstruct-examples/lists"}