Lets say I want to map the following two classes:
public class A {
String member;
public void setMember(String member) { this.member = member }
public String getMember() { return member }
}
public class B {
String member;
public B(String member) { this.member = member }
public String getMember() { return member }
}
Now when I want Dozer to do the following conversion: dozerBeanMapper.map( a, B.class );
I get an error because of the missing default constructor of class B
.
What's the best way to solve that problem? Use a custom converter?