Skip to content

Use @Context parameters as source #1280

Description

@lex-em

Can I use @context parameters as source in mappings? I.e.

    @Mapping(target = "field1", source = "param.field")
    @Mapping(target = "field2", source = "contextParam")
    protected abstract TargetType map(SourceType param, @Context Sometype contextParam);

I get error that there no parameter contextParam for mapping

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions