diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/annotation/MessageMapping.java b/org.springframework.integration/src/main/java/org/springframework/integration/annotation/Payload.java
similarity index 67%
rename from org.springframework.integration/src/main/java/org/springframework/integration/annotation/MessageMapping.java
rename to org.springframework.integration/src/main/java/org/springframework/integration/annotation/Payload.java
index 9f15c2c77c..bc33141806 100644
--- a/org.springframework.integration/src/main/java/org/springframework/integration/annotation/MessageMapping.java
+++ b/org.springframework.integration/src/main/java/org/springframework/integration/annotation/Payload.java
@@ -24,10 +24,12 @@ import java.lang.annotation.Target;
/**
* This annotation allows you to specify a SpEL expression indicating that a method
- * parameter's value should be mapped from the result of expression processing.
- * The annotated parameter must be of the required type.
- * Example: void foo(@MessageMapping("headers.day") String arg) - will map the value of
- * the 'day' header to 'arg'.
+ * parameter's value should be mapped from the payload of a Message. The expression
+ * will be evaluated against the payload object as the root context. The annotated
+ * parameter type must match or be convertible from the evaluation result.
+ *
+ * Example: void foo(@Payload("city.name") String cityName) - will map the value of
+ * the 'name' property of the 'city' property of the payload object.
*
* @author Oleg Zhurakousky
* @since 2.0
@@ -35,8 +37,11 @@ import java.lang.annotation.Target;
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@Documented
-public @interface MessageMapping {
+public @interface Payload {
- String value();
+ /**
+ * Expression for matching against nested properties of the payload.
+ */
+ String value() default "";
}
diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/handler/ArgumentArrayMessageMapper.java b/org.springframework.integration/src/main/java/org/springframework/integration/handler/ArgumentArrayMessageMapper.java
index 85711c71ef..05e07d5abf 100644
--- a/org.springframework.integration/src/main/java/org/springframework/integration/handler/ArgumentArrayMessageMapper.java
+++ b/org.springframework.integration/src/main/java/org/springframework/integration/handler/ArgumentArrayMessageMapper.java
@@ -40,7 +40,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.integration.annotation.Header;
import org.springframework.integration.annotation.Headers;
-import org.springframework.integration.annotation.MessageMapping;
+import org.springframework.integration.annotation.Payload;
import org.springframework.integration.core.Message;
import org.springframework.integration.message.InboundMessageMapper;
import org.springframework.integration.message.MessageBuilder;
@@ -168,8 +168,14 @@ public class ArgumentArrayMessageMapper implements InboundMessageMapper