Skip to content

Any ability to define global mapper and use it implicitly? #2102

@linarkou

Description

@linarkou
  • Is this an issue (and hence not a question)?

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions