[英]Swagger UI gives me this error message: Unable to infer base url
What can I do to get rid of this error message I see whenever I try to open my Swagger UI documentation on localhost:每当我尝试在本地主机上打开我的 Swagger UI 文档时,我该怎么做才能摆脱这条错误消息:
Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway.
无法推断 base url。这在使用动态 servlet 注册或 API 在 API 网关后面时很常见。
The error message "Unable to infer base url" often shows a failure of the Swagger UI to locate the API documentation automatically.错误消息“无法推断基本 url”通常显示 Swagger UI 无法自动定位 API 文档。 This may occur when utilising dynamic servlet registration or when the API is protected by an API Gateway.
当使用动态 servlet 注册或 API 受 API 网关保护时,可能会发生这种情况。 You can manually input the base url for the API documentation in the field provided to fix this error, such as http://localhost:8080/swagger-ui.html, or if the API is protected by an API Gateway, you can enter the right URL for the API Gateway.
您可以在提供的字段中手动输入 8810051213388 文档的基础 url 以修复此错误,例如 http://localhost:8080/swagger-ui.html,或者如果 API 受网关保护,您可以输入 881003851213右边的 URL 为 API 网关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.