org.springframework.messaging.handler.annotation

## Annotation Type Payload

-     @Target(value=PARAMETER)
       @Retention(value=RUNTIME)
       @Documented
      public @interface Payload

  Annotation that binds a method parameter to the payload of a message. The payload may be passed through a `MessageConverter` to convert it from serialized form with a specific MIME type to an Object matching the target method parameter.
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `required` Whether payload content is required.
    `String` | `value` A SpEL expression to be evaluated against the payload object as the root context.

- - ### Element Detail

    - #### value

          public abstract String value

      A SpEL expression to be evaluated against the payload object as the root context. 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.

      When processing STOMP over WebSocket messages this attribute is not supported.

      Default:
        ""

  - - #### required

          public abstract boolean required

      Whether payload content is required.

      Default is `true`, leading to an exception if there is no payload. Switch to `false` to have `null` passed when there is no payload.

      Default:
        true