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:
相关配置
- Swagger配置类
- Swagger配置文件
3. SpringSecurity配置过滤器
解决办法
Swagger会在后台静默下载API相关的依赖,他们目录不一样,所以我们只需要开放要下载的资源的目录即可,点此解决
,打开注释掉的资源路径即可