Skip to content
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

Same prefix path in two classes leads to 404 not found #27659

Closed
antssilva96 opened this issue Sep 1, 2022 · 3 comments
Closed

Same prefix path in two classes leads to 404 not found #27659

antssilva96 opened this issue Sep 1, 2022 · 3 comments
Labels
kind/bug Something isn't working triage/duplicate This issue or pull request already exists

Comments

@antssilva96
Copy link

Describe the bug

This bug seems to be similar to #18542 but is happening in regular quarkus-resteasy.

I have a resourceA with

@Path("test")
public class ResourceA {
    @GET
    @Path("{testId}")
    public String getString(@PathParam("testId") final long testId) {
        return "hello this is test from resource A";
    }
}

and a resourceB with

@Path("test/{testId}")
public class ResourceB {
    // no GET endpoint here
}

and this leads to 404 NOT Found when I perform a GET /test/1234, even though it should be able to find the method in ResourceA.

If I remove the /{testId} from ResourceB's path it works as expected.

Expected behavior

All classes should be scanned for matching endpoints and it should be able to find the request when it exists in another resource class.

Actual behavior

Getting 404 not found if the method is not present in the resource with the most specific path that matches the request.

How to Reproduce?

No response

Output of uname -a or ver

Linux laptop-XXXX 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.2" 2022-01-18

GraalVM version (if different from Java)

No response

Quarkus version or git rev

<quarkus.platform.version>2.11.3.Final</quarkus.platform.version>

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.5

Additional information

No response

@antssilva96 antssilva96 added the kind/bug Something isn't working label Sep 1, 2022
@geoand
Copy link
Contributor

geoand commented Sep 1, 2022

I am going to close this as a duplicate of #25462

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2022
@geoand geoand added the triage/duplicate This issue or pull request already exists label Sep 1, 2022
@antssilva96
Copy link
Author

Thanks! Should we add a not that it doesn't happen only_ for reactive resteasy ?

@geoand
Copy link
Contributor

geoand commented Sep 1, 2022

A note where?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants