Skip to content

Commit e010309

Browse files
committed
Use @payload on method declaration
Issue: SPR-12071
1 parent 3922f6f commit e010309

File tree

1 file changed

+5
-4
lines changed
  • spring-messaging/src/main/java/org/springframework/messaging/handler/annotation

1 file changed

+5
-4
lines changed

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,14 +25,15 @@
2525
import org.springframework.messaging.converter.MessageConverter;
2626

2727
/**
28-
* Annotation that binds a method parameter to the payload of a message. The payload may
29-
* be passed through a {@link MessageConverter} to convert it from serialized form with a
28+
* Annotation that binds a method parameter to the payload of a message. Can also
29+
* be used to associate a payload to a method invocation. The payload may be passed
30+
* through a {@link MessageConverter} to convert it from serialized form with a
3031
* specific MIME type to an Object matching the target method parameter.
3132
*
3233
* @author Rossen Stoyanchev
3334
* @since 4.0
3435
*/
35-
@Target(ElementType.PARAMETER)
36+
@Target({ElementType.PARAMETER, ElementType.METHOD})
3637
@Retention(RetentionPolicy.RUNTIME)
3738
@Documented
3839
public @interface Payload {

0 commit comments

Comments
 (0)