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

Unable to infer base url. #3129

Closed
mjrother opened this issue Sep 29, 2019 · 4 comments
Closed

Unable to infer base url. #3129

mjrother opened this issue Sep 29, 2019 · 4 comments
Labels

Comments

@mjrother
Copy link

I am trying to integrate springfox-swagger 2 (2.9.2) into our spring boot 2.0.8 web application. The api-docs URL works fine. I am seeing the infamous "Unable to infer base url..." dialog when i try the swagger-ui.html URL. I have security disabled so that is not the issue. I see the following requests from the web server log and the requests are returning 200. As far as I can tell, an exception is thrown in the springfox.js .
The api-docs request:
GET /XXXXX/api-docs HTTP/1.1 200 5688

The swagger-ui.html requests:
GET /XXXXX/swagger-ui.html HTTP/1.1 200 3318
GET /XXXXX/webjars/springfox-swagger-ui/springfox.css?v=2.9.2 HTTP/1.1 200 2894 http://localhost:8080/XXXXX/swagger-ui.html
GET /XXXXX/webjars/springfox-swagger-ui/swagger-ui.css?v=2.9.2 HTTP/1.1 200 154488 http://localhost:8080/XXXXX/swagger-ui.html
GET /XXXXX/webjars/springfox-swagger-ui/springfox.js?v=2.9.2 HTTP/1.1 200 96207 http://localhost:8080/XXXXX/swagger-ui.html
GET /XXXXX/webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js?v=2.9.2 HTTP/1.1 200 440850 http://localhost:8080/XXXXX/swagger-ui.html
GET /XXXXX/webjars/springfox-swagger-ui/swagger-ui-bundle.js?v=2.9.2 HTTP/1.1 200 1448844 http://localhost:8080/XXXXX/swagger-ui.html
GET /XXXXX/swagger-resources/configuration/ui HTTP/1.1 200 513 http://localhost:8080/XXXXX/swagger-ui.html
GET /XXXXX/swagger-resources/configuration/security HTTP/1.1 200 70 http://localhost:8080/XXXXX/swagger-ui.html
GET /XXXXX/swagger-resources HTTP/1.1 200 171 http://localhost:8080/XXXXX/swagger-ui.html

How can we further narrow down the problem?

@jayzh1010
Copy link

same with you, who knows how to resolve it

@jayzh1010
Copy link

i resolve my problem, because i implements ResponseBodyAdvice, when i remove it, swagger run successfully

ref: #3001 (comment)

@stale
Copy link

stale bot commented Jun 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 24, 2020
@stale
Copy link

stale bot commented Jul 8, 2020

This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.

@stale stale bot closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants