错误信息为:
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:
刚开始我以为是浏览器问题,运气不佳。经过排查总结了2个问题:
1,版本问题:2.8以后的版本很容易出现这类问题。
2,在application启动类中未定义@EnableSwagger2注解