Source and destination entities have difference in style of field-naming (underscore in one, camelCase - in another). So, source:
public class User {
private String first_name;
}
Destination:
public class UserDto {
private String firstName;
}
I have a task to convert entities by ModelMapper automatically - without handle mapping of fields (by getter-setter).
For this aim I tried to configure mapper as follows:
ModelMapper modelMapper = new ModelMapper();
modelMapper.getConfiguration()
.setSourceNameTokenizer(NameTokenizers.UNDERSCORE);
But this does not work