recursive mapping support

This commit is contained in:
Keith Donald
2009-10-05 20:28:10 +00:00
parent fd8935ba0b
commit 0a843e60a6
7 changed files with 151 additions and 6 deletions

View File

@@ -142,11 +142,7 @@ public class SpelMapperTests {
mapper.addMapping("fullName", "name");
mapper.addMapping("sport", "favoriteSport");
mapper.addMapping("nested", "nested").setConverter(new Converter<NestedDto, Nested>() {
public Nested convert(NestedDto source) {
return (Nested) new SpelMapper().map(source, new Nested());
}
});
mapper.addMapping("nested", "nested");
mapper.map(source, target);
assertEquals("Keith Donald", target.name);