Hi! I'm new to MapStruct, before I've used ModelMapper, and it has ability to register global converter between types (ex. LocalDate -> Date). Then in any other converter it will implicitly use this converter for converting LocalDate to Date.
In MapStruct I only found @Mapper#uses() for reusing converter, but I need to add it explicitly into all converters. So does there any way to add global converter and use it implicitly?
Actually I want to write converter from java DateTime API to google.protobuf.Timestamp timestamp.proto. And then implicitly reuse it in mappings between date/time fields.
Hi! I'm new to MapStruct, before I've used ModelMapper, and it has ability to register global converter between types (ex.
LocalDate->Date). Then in any other converter it will implicitly use this converter for convertingLocalDatetoDate.In MapStruct I only found
@Mapper#uses()for reusing converter, but I need to add it explicitly into all converters. So does there any way to add global converter and use it implicitly?Actually I want to write converter from java DateTime API to google.protobuf.Timestamp timestamp.proto. And then implicitly reuse it in mappings between date/time fields.