-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Matching a base path of another controller, results in 405 Method Not Allowed
#26496
Comments
I am not sure this is allowed as per the JAX-RS spec. |
/cc @FroMage, @stuartwdouglas |
Really? Hmm, I know this is possible in Spring, although the have different annotations.. OK if this is the case, then it's my bad.. |
Spring doesn't implement JAX-RS :)
I'm not sure either, lets see if others know for sure |
Well, frankly, the JAX-RS spec routing algo I never understood: https://jakarta.ee/specifications/restful-ws/3.1/jakarta-restful-ws-spec-3.1.html#request_matching But the use-case looks legit to me, both classes should be analogous IMO, since in both cases the endpoints have the same URIs. So IMO we should support this. |
I agree it would be useful |
Hi team, same issue here .. is there anything I can do to workaround it? |
For the time being, only to not have overlapping paths. But we should definitely address this one |
Describe the bug
It took me some time to understand the bug I am hitting, but now I am pretty certain it's a bug and it's reproducible. Let's imagine you have two controllers:
Calling
GET /base/123
will result inHTTP 405 Method Not Allowed
. Note that:List of endpoints
However, seems that the base-path of the second controller is hiding the first controller in case when things are getting resolved in the
org.jboss.resteasy.reactive.server.handlers.ClassRoutingHandler
.Expected behavior
Target method executed correctly.
Actual behavior
405 Method Not Allowed
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.10.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven home: /home/ise/.m2/wrapper/dists/apache-maven-3.8.4-bin/52ccbt68d252mdldqsfsn03jlf/apache-maven-3.8.4 Java version: 17.0.3, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.13.0-51-generic", arch: "amd64", family: "unix"
Additional information
Workaround is to match base paths in both controllers:
The text was updated successfully, but these errors were encountered: