From 5ddd0539eba0ff4b6b3f2a28d44f3237a1c13a83 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Sat, 10 Oct 2009 19:35:46 +0000 Subject: [PATCH] updated documntation now that @MessageMapping uses 'value' --- .../src/configuration.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-integration-reference/src/configuration.xml b/spring-integration-reference/src/configuration.xml index 5683fa19aa..02509d6c42 100644 --- a/spring-integration-reference/src/configuration.xml +++ b/spring-integration-reference/src/configuration.xml @@ -251,17 +251,17 @@ public class FooService { } -A more powerful and flexible way mapping Message parts to method arguments is to use @MessageMapping +A more powerful and flexible way to map Messages to method arguments is to use @MessageMapping annotation which allows you to define expression via Spring 3.0 Expression Language support to help parse -message parts and map them to method arguments. +the message payload and/or header and map the parsed values to method arguments. For example: -public void fromMessageToMethod(@MessageMapping(expression="headers.day")String argA, - @MessageMapping(expression="#this")Message message, - @MessageMapping(expression="payload")Employee payloadArg, - @MessageMapping(expression="payload.fname")String value, - @MessageMapping(expression="headers")Map headers){} +public void fromMessageToMethod(@MessageMapping("headers.day") String argA, + @MessageMapping("#this") Message message, + @MessageMapping("payload") Employee payloadArg, + @MessageMapping("payload.fname") String value, + @MessageMapping("headers") Map headers) { ... } As you can see, the above method takes 5 arguments where: @@ -275,7 +275,7 @@ As you can see, the above method takes 5 arguments where: Third - will be mapped to the Payload - Fourth - will be mapped to the 'fname' attribute of a Payload object + Fourth - will be mapped to the 'fname' property of a Payload object Fifth - will be mapped to MessageHeaders