swagger:Unable to infer base url. This is common when using dynamic servlet registration or when
一、错误描述Spring Boot项目连接Swagger报错:Unable to infer base url. This is common when using dynamic servletregistration or when the API is behind an API Gateway.The base url is the root of where all the swagge
·
一、错误描述
Spring Boot项目连接Swagger报错:
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:
二、解决办法
报出错误之后,在网上找了很多的解决办法,尝试过修改路径和不断刷新,去清除缓存,但是问题都没有得到实质性的解决。
我是在启动类中添加了**@EnableSwagger2**注解。
如果问题还没有得到解决,可以参考下面的两篇博客。
参考博客:
https://blog.csdn.net/just_now_and_future/article/details/89343680
更多推荐
已为社区贡献1条内容
所有评论(0)