Annotation Interface QueryParam


@Target(PARAMETER) @Retention(SOURCE) public @interface QueryParam
Binds a method parameter to a query string parameter. The value is converted from its string form to the parameter's declared type.

Usage:


 public String search(@QueryParam("q") String query) { ... }
 
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the query parameter to bind.
  • Element Details

    • value

      String value
      The name of the query parameter to bind. When left blank, the method parameter's own name is used.
      Returns:
      the query parameter name, or "" to use the parameter name
      Default:
      ""