@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2014 the original author or authors .
* Copyright 2002 - 2015 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -22,6 +22,7 @@ import java.lang.annotation.Retention;
@@ -22,6 +22,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy ;
import java.lang.annotation.Target ;
import org.springframework.core.annotation.AliasFor ;
import org.springframework.messaging.converter.MessageConverter ;
/ * *
@ -31,6 +32,7 @@ import org.springframework.messaging.converter.MessageConverter;
@@ -31,6 +32,7 @@ import org.springframework.messaging.converter.MessageConverter;
* specific MIME type to an Object matching the target method parameter .
*
* @author Rossen Stoyanchev
* @author Sam Brannen
* @since 4 . 0
* /
@Target ( { ElementType . PARAMETER , ElementType . METHOD } )
@ -38,14 +40,23 @@ import org.springframework.messaging.converter.MessageConverter;
@@ -38,14 +40,23 @@ import org.springframework.messaging.converter.MessageConverter;
@Documented
public @interface Payload {
/ * *
* Alias for { @link # expression } .
* /
@AliasFor ( attribute = "expression" )
String value ( ) default "" ;
/ * *
* A SpEL expression to be evaluated against the payload object as the root context .
* < p >
* This attribute may or may not be supported depending on whether the message being
* handled contains a non - primitive Object as its payload or is in serialized form
* and requires message conversion .
* < p > When processing STOMP over WebSocket messages this attribute is not supported .
* handled contains a non - primitive Object as its payload or is in serialized form and
* requires message conversion .
* < p >
* When processing STOMP over WebSocket messages this attribute is not supported .
* /
String value ( ) default "" ;
@AliasFor ( attribute = "value" )
String expression ( ) default "" ;
/ * *
* Whether payload content is required .