From e0103095301c580643d602ab6cd25d37b51d22ca Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 7 Aug 2014 15:07:20 +0200 Subject: [PATCH] Use @Payload on method declaration Issue: SPR-12071 --- .../messaging/handler/annotation/Payload.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java index 8c3d0a9ec5..d83a2516b1 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 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. @@ -25,14 +25,15 @@ import java.lang.annotation.Target; import org.springframework.messaging.converter.MessageConverter; /** - * Annotation that binds a method parameter to the payload of a message. The payload may - * be passed through a {@link MessageConverter} to convert it from serialized form with a + * Annotation that binds a method parameter to the payload of a message. Can also + * be used to associate a payload to a method invocation. The payload may be passed + * through a {@link MessageConverter} to convert it from serialized form with a * specific MIME type to an Object matching the target method parameter. * * @author Rossen Stoyanchev * @since 4.0 */ -@Target(ElementType.PARAMETER) +@Target({ElementType.PARAMETER, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Payload {