Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

vsoltys/mapstruct-examples

Open more actions menu
 
 

Repository files navigation

MapStruct Examples

This repository contains examples showing how to use MapStruct, a Java annotation processor for the generation of type-safe bean mapping classes.

Currently, the following examples exist:

  • mapstruct-on-ant: Shows how to use MapStruct in Ant-based projects; to build this example, run ant build on the command line
  • 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
  • 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
  • mapstruct-iterable-non-iterable: Shows how by means of a mapper util class conversions can be made from an iterable- to its non-iterable element
  • mapstruct-rounding: Shows how by means of a mapper util class and qualifiers roundings can be carried out on Numbers
  • mapstruct-examples-updatemethods-1: Shows how to update an existing target object
  • mapstruct-examples-field-mapping: Shows how MapStruct can be used with "struct" like objects with public fields
  • mapstruct-nested-bean-mappings: Shows how to map object graphs via a main root method
  • mapstruct-mapping-with-cycles: Shows how to map object graphs that can contain cycles
  • mapstruct-spi-accessor-naming: Example on how to use the Service Provider Interface (SPI) for a custom accessor naming strategy.

License

The examples in this project are licensed under the Apache License, Version 2.0.

About

Examples for using MapStruct

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.