Status: Open (View Workflow)
Affects Version/s: 4.5.5.Final
Fix Version/s: None
Component/s: Spring / Spring Boot
Steps to Reproduce:
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
- 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
I understand that this might not be an issue, since it's by design. As seen in the docs:
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.