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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 4.5.5.Final
    • Spring / Spring Boot
    • None
    • 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
    • Undefined

    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.

      Attachments

        Issue Links

          Activity

            People

              weinanli Weinan Li
              rhn-support-zanini Ricardo Zanini Fernandes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: