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忘记添加,加上重启
第二种情况:微服务架构:单独将swagger分到一个工具类工程的话,需要使用swagger的工程需要手动扫描包
工具类工程
需要导入swagger的工程,加上扫描包的注解就可以了,