-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Java Version: 1.8
mapstruct: 1.3.0.Final
SpringBoot: 2.2.0
example:
@Mapper(
componentModel = "spring",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface ProductAssetMapper {
@Mapping(
target = "tags",
expression = "java(com.wiz.lib.utils.MapperUtils.stringToArray(productAsset.getTags()))")
ProductAsset parseFromEntity(ProductAssetEntity productAsset);
@Mapping(target = "variantCount", expression = "java(productAsset.getVariants().size())")
ProductAssetSnapshot productAssetEntityToProductAssetSnapshot(ProductAssetEntity productAsset);
Iterable<ProductAssetSnapshot> parseSnapshot(Iterable<ProductAssetEntity> iterables);
}execute:
mvn compileError:
Ambiguous mapping methods found for mapping collection element to java.lang.Object: com.xx.ProductAsset parseFromEntity(com.xx.ProductAssetEntity productAsset), com.xx.ProductAssetSnapshot productAssetEntityToProductAssetSnapshot(com.xx.ProductAssetEntity productAsset).Reactions are currently unavailable