Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Request Structure and there are a few property where comes in like null value when my mapstruct method generated it throw NullPointerExceptionValue because of properties are null. But I want to prevent that problem with using MapStruct. is there any solution fix that problem?

What I have tried:

I tried to using in the following solutions but it couldn't work.

@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900