Annotation Type RequestBody


@Retention(CLASS) @Target(PARAMETER) public @interface RequestBody

Binds the decoded request body to this parameter.

The body is decoded to the parameter's declared type using the generated codec for it, so a controller receives its own type rather than a Map.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether a request with no body is rejected.
  • Element Details

    • required

      boolean required
      Whether a request with no body is rejected.
      Default:
      true