Use @Payload on method declaration

Issue: SPR-12071
This commit is contained in:
Stephane Nicoll 2014-08-07 15:07:20 +02:00
parent 3922f6fc53
commit e010309530
1 changed files with 5 additions and 4 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; import org.springframework.messaging.converter.MessageConverter;
/** /**
* Annotation that binds a method parameter to the payload of a message. The payload may * Annotation that binds a method parameter to the payload of a message. Can also
* be passed through a {@link MessageConverter} to convert it from serialized form with a * 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. * specific MIME type to an Object matching the target method parameter.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 4.0 * @since 4.0
*/ */
@Target(ElementType.PARAMETER) @Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Documented @Documented
public @interface Payload { public @interface Payload {