Annotationsschnittstelle RoutingPath


Marks a method as RouteHandler method. The specified path template needs to match in order to apply the method.

Path templates are relative, since every router has a path prefix (including SessionContext). Path templates are normalized, meaning: a leading '/' will be added and trailing slashes will be removed automatically.

Example:

 @Routing("/foo/{id}")
 String setFooId(@PathParameter("id") Integer id,
                 @QueryParameter("filter") String filter) {
        ...
 }
 
  • Erforderliche Elemente - Übersicht

    Erforderliche Elemente
    Modifizierer und Typ
    Erforderliches Element
    Beschreibung
    Defines the path template.
  • Optionale Elemente - Übersicht

    Optionale Elemente
    Modifizierer und Typ
    Optionales Element
    Beschreibung
    boolean
    Whether the path template should NOT match longer paths.
  • Elementdetails

    • value

      String value
      Defines the path template.

      Path templates do not need to do any URL encoding.

      Do not include query parameters nor matrix parameters. (Matrix parameters are not supported at all in TeamApps.)

      Embedded template parameters are allowed and are of the form:

         param = "{" *WSP name *WSP [ ":" *WSP regex *WSP ] "}"
         name = (ALPHA / DIGIT / "_")*(ALPHA / DIGIT / "." / "_" / "-" ) ; \w[\w\.-]*
         regex = *( nonbrace / "{" *nonbrace "}" ) ; where nonbrace is any char other than "{" and "}"
       
    • exact

      boolean exact
      Whether the path template should NOT match longer paths.

      Path templates match paths with more path elements by default. For example "/foo" matches "/foo/bar". Specify false to prevent this behavior.

      Standard:
      false