From 4c094c336df78e25476842c49d9fd7adc2197a7b Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Sat, 17 Oct 2009 06:39:35 +0000 Subject: [PATCH] polish git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2149 50f2f4bb-b051-0410-bef5-90022cba6387 --- spring-framework-reference/src/validation.xml | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/spring-framework-reference/src/validation.xml b/spring-framework-reference/src/validation.xml index 42f3959e88e..a0f70568c44 100644 --- a/spring-framework-reference/src/validation.xml +++ b/spring-framework-reference/src/validation.xml @@ -1564,30 +1564,14 @@ public class Account { } }]]> - Now mapped between in the following test case: + Now mapped in the following service method: +public void createAccount(CreateAccountDto dto) { + Account account = (Account) MapperFactory.getDefaultMapper().map(dto, new Account()); + // work with the mapped account instance +}]]> + In this example, the number, name, and address properties are automatically mapped since they are present on both the source and target objects. The AccountDto's address property is a JavaBean, so its nested properties are also recursively mapped.