Following this link I went for a similar approach and created a spring boot project https://auth0.com/blog/automatically-mapping-dto-to-entity-on-spring-boot-apis/
This i