You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a name parameter to routing annotations such as @Get etc.
This would allow us generate absolute or relative URLs by name and change URLs with less impact on other parts of an application. In addition this could also be used to pre-validate path parameters and create even safer applications.
Examples
@PathPrefix("/api/users")
publicclassUserController {
@Get("/{String:name}", name="greetUser")
publicStringgreet(@Path("name") Stringname) {
return"Hello " + name;
}
}
// In other parts of the applicationserver.makeRoute("greetUser", "JanHolger"); -> /api/users/JanHolger
The text was updated successfully, but these errors were encountered:
Add a name parameter to routing annotations such as
@Get
etc.This would allow us generate absolute or relative URLs by name and change URLs with less impact on other parts of an application. In addition this could also be used to pre-validate path parameters and create even safer applications.
Examples
The text was updated successfully, but these errors were encountered: