Using Mapstruct Library

 => Go to https://mapstruct.org

 => Go to Documentation Section (Installation)

 => If you’re using Maven to build your project add the following to your pom.xml to use MapStruct: 



=> Add this properties in your pom.xml properties section


You need some extra configuration to use the Lombok library with MapStruct in your Spring Boot application.

  1. Go to the official MapStruct documentation.
  2. Click on Examples, which will take you to the MapStruct examples GitHub repository.
  3. Find and open the MapStruct Lombok project.
  4. Open the pom.xml file and scroll down and add the plugin to your pom.xml file plugins section.



Change the source and target to your Java version 

=> Then add these two properties in your pom.xml section :


Always use the latest code of the website


Comments