mapstruct icon indicating copy to clipboard operation
mapstruct copied to clipboard

Defining an interface for each transformation is a hassle

Open jmilktea opened this issue 2 years ago • 1 comments

Use case

It is troublesome to define an interface for each conversion. Is there a shorthand way to write it? Simple as this: Car car = new Car(); CarDto carDto = convert. convert(car);

Some implementations are as follows: https://github.com/linpeilie/mapstruct-plus

mapstruct itself should have such a function.

Generated Code

No response

Possible workarounds

No response

MapStruct Version

No response

jmilktea avatar Jul 20 '23 09:07 jmilktea

@jmilktea what exactly are you expecting from MapStruct to do?

Car car = new Car();
CarDto carDto = convert. convert(car);

What do you expect as a user to be able to do to be able to have that converter. Have you seen our mapstruct-spring-extensions project?

filiphr avatar Jul 30 '23 07:07 filiphr