-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for multiple paths on the same mapping #1422
Comments
Looking at the router reference I've created the following example which make a hack for my case, anyway I think this is a nice freature which should be considered @Patch(value = "/api/v{version:[12]}.0/settings")
public HttpResponse route(String version, @Body Object o){
....... |
I don't think that is a hack. That is the intended use case |
For my case yes, but thinking in a case where you have two totally different URIs but you want to call the same method then I think the first example fits better, something like @Get({"/legacy-url/my-project", "/new-web-site/the-new-project"})
public String loadProject(){
.....
} Just like Spring Web do |
I think what would make sense here is to allow the HTTP annotations to be repeatable. The example above looks complex to me |
Probably something for 1.2
|
I think that would be very nice, but would make it even better (to me) is to allow stacking methods. Example:
|
@graemerocher why did you close this ticket? Is it fixed or won't it be fixed? I'm asking because I don't see any reference to a PR or commit. |
Oops sorry. PR merged #2188 |
Expected Behaviour
I think it would be very nice if
@Get
,@Post
, etc. have the support for multiple paths instead of only one, something like thatActual Behaviour
I can't map multiple paths to the same controller method, so I have to create a common controller method and create another method for every new mapping I want to create, it is a LOT more verbose to develop
Environment Information
The text was updated successfully, but these errors were encountered: