swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.56k stars 8.96k forks source link

Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway. #4361

Closed RobertoHuang closed 6 years ago

RobertoHuang commented 6 years ago

Hi , I user swagger-ui version-2.8.0,when I start the project and visit http://localhost:8080/swagger-ui.html,the error has happend。[Enviroment:SpringBoot1.5.10.RELEASE+Swagger-UI-2.8.0]

Error Message:Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway. The base url is the root of where all the swagger resources are served. For e.g. if the api is available at http://example.org/api/v2/api-docs then the base url is http://example.org/api/. Please enter the location manually:

I do not user SpringSecurity,and when I change version to 2.7.0,the error disappeared,how can I solve this problem in version 2.8.0

lock[bot] commented 5 years ago

Locking due to inactivity.

This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.

If you think you're experiencing something similar to what you've found here: please open a new issue, follow the template, and reference this issue in your report.

Thanks!