-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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")
public class UserController {
@Get("/{String:name}", name="greetUser")
public String greet(@Path("name") String name) {
return "Hello " + name;
}
}
// In other parts of the application
server.makeRoute("greetUser", "JanHolger"); -> /api/users/JanHolgerMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request