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
JAX-RS sub-resource locators with parameter don't always match #26028
Comments
/cc @FroMage, @stuartwdouglas |
Since you have already analyzed the code, would you like to provide a Pull Request with your proposed change? |
Sadly I did not find the origin of the constructor call. I think it is related to some code which is generated at build time, so my IDE could not resolve the source. |
Can you attach a sample project? |
I already did in the original Issue. |
I further looked into the issue and I think I found the responsible constructor call. I fixed it in #26115 |
Added a new PR to the correct base branch. See #26224 |
Describe the bug
When using JAX-RS resource locators and sub-resources I don't always get the expected behavior. The paths don't match as expected. If you have a resource locator annotated with
@Path("{id}SomethingElse")
and a nested path in the sub-resource, quarkus will not match the path but rather output a404
.I think this is related to this line in the
URITemplate
class. Or more specifically that theURITemplate
is mistakenly constructed withprefixMatch
set tofalse
. It should be set totrue
as the path only refers to a resource locator and not an actual method. Sadly I could not inspect further from where the constructor is called.Expected behavior
Referring to code posted below
If I request
GET /b/TomOther/greet
I expect to get returnedHello Tom
(same as when callingGET /a/Tom/greet
)Actual behavior
I get
404 - Resource Not Found
status code.How to Reproduce?
Repository or see code below
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "11.0.13" 2021-10-19
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: