MapperConfig from another jar with multiple arguments

31 views
Skip to first unread message

Baptiste Pernet

unread,
Oct 29, 2020, 4:39:23 PM10/29/20
to mapstru...@googlegroups.com

Hello,

I wonder if someone else encountered the same issue when using @MapperConfig from another jar on a method that has multiple arguments:

@MapperConfig
public interface PersonMapperConfig {

    @Mapping(target = ".", source = "arg0")
    @Mapping(target = "petId", source = "arg1.id")
    PersonDto toDto(Person person, Animal pet);
}
I ended up using arg0 and arg1 as the parameter names, because the code that is using this config is not in the same jar, and it's referencing the configuration as part of its dependencies.

Thank you for your feedback
--
Baptiste
Reply all
Reply to author
Forward
0 new messages