I'm trying to convert a List<String>
to the below DomainUpdate object. The DomainUpdate object contains a List of Domains and a Domain just have a String value.
DomainUpdate{
List<Domain> domains;
}
Domain{
String value;
}
I can't seem to find any good documentation on how to do this and my current implementation just complains:
error: Can't generate mapping method from iterable type from java stdlib to non-iterable type.
Mapper
@Mapper(componentModel = "spring", collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED)
public interface DomainProtobufMapper {
DomainUpdate domainsToProtobuf(List<String> domains);
}