Annotation Interface PathParam


@Retention(RUNTIME) @Target(PARAMETER) public @interface PathParam
Injects a path variable from the URI into a handler method parameter.

Example:


 @HandleGet("/users/{id}")
 User getUser(@PathParam String id) { ... }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Parameter name in the URI pattern.
  • Element Details

    • value

      String value
      Parameter name in the URI pattern. If left empty, it defaults to the method parameter's name;
      Default:
      ""