-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
MvcUriComponentsBuilder.fromMethodName does not pick the annotated method transparently #32553
Comments
@NicoStrecker rather than code in text, can you please edit your description and replace it with a sample application we can run ourselves. You can attach a zip to this issue or push the code the a GitHub repository. |
Sure should i add comments for expected behaviour? |
You can add that in the readme. |
@snicoll you find the zip file in the updated description |
Thanks Nico. This seems to be due to the fact that the We'll see what we can do to transparently handle this case. |
Thank you very much. We frequently define our REST interface in an "API" interface with Springdoc, where we define our path variables and implement it in the class without the many annotations. |
@NicoStrecker if you get a chance to test |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry @snicoll i just didnt know how to do that. I have to say there is not much information about I tried it out and it works as expected thank you very much |
Version: `Spring-Boot 3.2.4
I try to use the MvcUriComponenntsBuilder.fromMethodName to generate the path to a ressource based on a method of my controller.
My Controller is implementing an interface where the API is defined.
the getMember-Method looks like this:
and in the interface like this:
Now i get the following behaviour, when i use the this.getClass() argument my location-header looks like this:
When i use the MemberApi.class it looks like this:
UPDATE 10.04.2024:
Spring-Issue-MvcUriCompontesBuilder-Example.zip
The text was updated successfully, but these errors were encountered: