DTO and Mapstruct — explanation for 5 years old
Published in
5 min readMay 18, 2021
If you reading this article, it seems, you have already skipped lots of articles, videos that have been written in unnecessary difficult language. Put a pillow under your neck, after 3 minutes you will have whole image about DTOs.
Let's create our Spring Boot Project with Gradle:
If You are using Maven, add dependencies aboveinto your POM.XML file.
DB connection parameters are set in the application.yaml file. Just make sure, you already have the “student_database” schema in your MySQL database.
Now let's create our layers: Controller, Service, Repository, and Entity as described on the left.