I am using mapstruct for mapping in my Spring Boot application. My source object is as below:
Customer{
String id;
String name;
List<Facility> facilityList;
}
Facility{
String fId;
String fName;
Integer off;
}
Before actual mapping of source to target object, I want to replace all empty value of string and list of source with null (without manual mapping)?
How to achieve this with mapstruct or any Java libraries?