0
votes

Mapstruct: Check for null for source before mapping to target. Require to throw a custom exception from mapstruct interface if the source is null.

1

1 Answers

0
votes

This is currently not supported. However, you can write something like this by using the defaultExpression.

Anyways, I would not suggest using MapStruct for this. Java Bean Validation is better suited for doing this.