-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
Could not resolve view with name 'redirect:/swagger-ui/index.html?url=/v3/api-docs&validatorUrl=' #150
Comments
Hello, We would be so happy to help, if you can attach or add the reference to a sample code that helps reproducing the issue you are describing. |
I’ve managed to resolve the issue. I haven’t yet exactly found what was the issue — it was either with @EnableWebMvc annotation or resource handler. I will investigate that in more detail and post the solution as soon as I have more time. |
Any update on what the issue was? I'm running into a similar issue except going directly to http://localhost:8080/swagger-ui/index.html?url=/v3/api-docs returns a 404. |
To reproduce:
|
…eb Mvc applications) fixes springdoc#236 springdoc#150
I have the same issue as @aaron-hooper
I've tried with version 1.2.18 and 1.2.22 - same issue. I've also attempted to create my own
|
@tonyfalabella can you provide a sample project with this issue? So that we could take a look at it. |
Sorry just getting back to this. No issue with the lib - issue for me was when I was running locally in IntelliJ. If you get a 404 error when Spring redirects swagger-ui.html to the webjar resource (that page resides in the webjars.jar file you included in your pom.xml) most likely you asked IntelliJ to "shorten your classpath". If you're on Java 11 the "classpath file" option is not available but "@argFile" is available. Unfortunately that didn't work for me. The only fix I could get to work was to move my Maven repos to a dir that was shorter. |
I had same Issue, as I understand @EnableWebMvc is not needed in Spring Boot 2.2.4. I removed it, and everything works now as expected. |
Hi guys! I had another variant of the same cause, so for future debuggers: WebMvc was in the way, but in stead of @EnableWebMvc, our project used DelegatingWebMvcConfiguration. Refactoring this solved the problem. Cheers! |
I had the same issue in Spring Boot 2.3.0, I resolved when I removed the @EnableWebMvc too, thank you. |
@joostpapendorp 's comment does give some pointer but doesn't explain how to refactor. I didn't have |
Hello, guys!
First of all I would like to thank you for the library :)
I'm currently researching it as a replacement for springfox swagger as it is not maintained anymore and I have found the following issue.
When opening http://localhost:8080/swagger-ui.html
I get:
When opening http://localhost:8080/swagger-ui/index.html?url=/v3/api-docs directly -- everything works fine.
Any ideas?
The text was updated successfully, but these errors were encountered: