Annotation Interface RoutingPath
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Repeatable(RoutingPaths.class)
public @interface 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) {
...
}
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether the path template should NOT match longer paths.
-
Element Details
-
value
String valueDefines 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 exactWhether 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.
- Default:
false
-