Conditional Mapping with MapStruct
Here below is the logic I need to implement my converter:
Unable to map the fields of Class from two classes in mapstruct
@Mapping(source = “key.locationType”, target = “basicLocation.locationTypeCode”) @Mapping(source = “detail.locationName”, target = “basicLocation.locationName”) LocationRequest toRequest(CachedLocationKey key, CachedLocationDetail detail); i am trying to map the object basicLocation in LocationRequest. locationType comes from key and locationName comes from detail. If i write both the mappings , there comes the below error : @Mapping(source = “key.locationType”, target = “basicLocation.locationTypeCode”) […]
AfterMapping is never caller when a decorator is used
I use spring boot with mapstruct. I have a decorator, i created a method to be called afterMapping.