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:
第一种情况:
可能是没有进行maven的刷新,可以试一下,我当时就出现过这种情况
第二种情况
1.看你的swaggerConfig加没加注解
@Configuration//配置类
@EnableSwagger2 //swagger注解
public class SwaggerConfig {2.看你的Application文件是否加了@ComponentScan(basePackages = {“xxxx”})