Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2702

When application is registered under the ROOT path (/), static content is not served anymore

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.5.5.Final
    • Fix Version/s: None
    • Component/s: Spring / Spring Boot
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      Show
      Use this project as a reference: https://github.com/kiegroup/kogito-examples/tree/master/process-springboot-example Compile with mvn clean install Run it with java -jar target/process-springboot-example.jar Try to access the generated static content: http://localhost:8080/swagger.json Will return 404 error handled by RESTEasy

      Description

      I understand that this might not be an issue, since it's by design. As seen in the docs:
      https://github.com/resteasy/resteasy-spring-boot/blob/master/mds/USAGE.md#jax-rs-application-registration-methods

      But in this approach, if the application is registered under the ROOT path ("/") RESTEasy takes over all the handlers, and on SpringBoot static content just ain't be served any more.

      In our particular scenario (Kogito) we don't know beforehand which path/context we will generate the REST resources (can be dozens), so we register in the ROOT path.

      Is there any way to instead of returning 404, handle the request back to the chain so SpringBoot MVC will take care to serve the content (or return 404)? Ideally, RESTEasy could take care only on its registered Paths instead.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  zanini Ricardo Zanini Fernandes
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: