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

No static resource swagger-ui/index.html error after migration to 2.7.0-RC1 #2786

Closed
marcioggs-ec opened this issue Nov 22, 2024 · 2 comments

Comments

@marcioggs-ec
Copy link

Describe the bug

The following error began occurring after migrating the dependencies listed below. The issue arises when attempting to open the URLs /context-path/swagger-ui/index.html or /context-path/swagger-ui.html and an error 500 is returned to the web browser.

Upgraded dependencies:

  • springdoc-openapi-starter-webmvc-ui from 2.5.0 to 2.7.0-RC1
  • spring-boot-starter-parent from 3.3.5 to 3.4.0

Error:

org.springframework.web.servlet.resource.NoResourceFoundException: No static resource swagger-ui/index.html.
   at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:585) ~[spring-webmvc-6.2.0.jar:6.2.0]
   at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:52) ~[spring-webmvc-6.2.0.jar:6.2.0]
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1088) ~[spring-webmvc-6.2.0.jar:6.2.0]
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:978) ~[spring-webmvc-6.2.0.jar:6.2.0]
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-6.2.0.jar:6.2.0]
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[spring-webmvc-6.2.0.jar:6.2.0]
   at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) ~[tomcat-embed-core-10.1.33.jar:6.0]
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.2.0.jar:6.2.0]
   at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.33.jar:6.0]
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195) ~[tomcat-embed-core-10.1.33.jar:10.1.33]
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.33.jar:10.1.33]
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.33.jar:10.1.33]
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164) ~[tomcat-embed-core-10.1.33.jar:10.1.33]
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140) ~[tomcat-embed-core-10.1.33.jar:10.1.33]

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using? 3.4.0
  • What modules and versions of springdoc-openapi are you using? springdoc-openapi-starter-webmvc-ui 2.7.0-RC1

Expected behavior

  • A clear and concise description of what you expected to happen.
    The Swagger UI page should be displayed.

Additional context
The JSON definitions at /v3/api-docs remain functional.
No logs from org.springdoc are generated when accessing the URL, even with the logging level set to TRACE.

@marcioggs-ec marcioggs-ec changed the title No static resource swagger-ui/index.html error on 2.7.0-RC1 No static resource swagger-ui/index.html after migration to 2.7.0-RC1 Nov 22, 2024
@marcioggs-ec marcioggs-ec changed the title No static resource swagger-ui/index.html after migration to 2.7.0-RC1 No static resource swagger-ui/index.html error after migration to 2.7.0-RC1 Nov 22, 2024
@bnasslahsen
Copy link
Collaborator

@marcioggs-ec,

Not reproducible.
Feel free to provide a Minimal, Reproducible Example - with HelloController that reproduces the problem.

This ticket will be closed, but can be reopened if your provide the reproducible sample.

@noshua
Copy link

noshua commented Dec 4, 2024

Even the official springdoc examples aren't working anymore.

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants