Spring Integration

org.springframework.integration.annotation
Annotation Type Payload


@Target(value={PARAMETER,METHOD})
@Retention(value=RUNTIME)
@Documented
public @interface Payload

This annotation allows you to specify a SpEL expression indicating that a method 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.

Since:
2.0
Author:
Oleg Zhurakousky

Optional Element Summary
 String value
          Expression for matching against nested properties of the payload.
 

value

public abstract String value
Expression for matching against nested properties of the payload.

Default:
""

Spring Integration

Copyright © 2010. All Rights Reserved.