Skip to content
Advertisement

org.mapstruct don’t work with a base class

I have 2 classes. My base class:

JavaScript

And my other class. This class extends BaseRequest class.

JavaScript

And When I try create a mapper to cast my AddClass to OtherClass:

JavaScript

When I run my build I received this error:

Error:(22,13) java: No property named “dateTransaction” exists in source parameter(s). Did you mean “null”?

Advertisement

Answer

MapStruct works without issues with Lombok.

However, if you have upgraded to Lombok 1.18.16 as per the Lombok Changelog then you need to add

lombok-mapstruct-binding

In Gradle:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement