BeanMappingBuilder builder = new BeanMappingBuilder() {
@Override
protected void configure() {
TypeMappingBuilder mapping = mapping(text.getClass(), o2);
mapping .fields("name", "address");
mapping .fields("drink", "person"
,hintA(o3)
,hintB(o4)
);
TypeMappingBuilder mapping2 = mapping(o3, o4);
mapping2 .fields("aaa.id", "name.id");
mapping2 .fields("aaa.name", "name.tag");
mapping2 .fields("aaa.text", "name.value");
}
};
Mapper mapper =DozerBeanMapperBuilder.create()
.withMappingBuilders(builder).build();
Object map = mapper.map(text, o2);