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:
报错信息:Caused by: java.io.IOException: 你的主机中的软件中止了一个已建立的连接。
这是由于在启动类中忘记加@EnableSwagger2注解
@SpringBootApplication
@EnableSwagger2
public class InsertApplication {
public static void main(String[] args) {
SpringApplication.run(InsertApplication.class,args);
}
}
这样就解决了