Annotation Interface RequestParam


@Target(PARAMETER) @Retention(RUNTIME) public @interface RequestParam
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The default value to use as a fallback.
    boolean
    Indicates whether this request parameter is required.
    The name of the request parameter to bind to this method parameter.
  • Element Details

    • value

      String value
      The name of the request parameter to bind to this method parameter. If not specified, the method parameter name will be used.
      Returns:
      The name of the request parameter
      Default:
      ""
    • required

      boolean required
      Indicates whether this request parameter is required. If true, an error will be thrown if the parameter is not present in the request. If false, the parameter will be optional.
      Returns:
      true if the parameter is required, false otherwise
      Default:
      true
    • defaultValue

      String defaultValue
      The default value to use as a fallback.

      Supplying a default value implicitly sets required() to false.

      Default:
      "\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n"