Unable to infer base url. ......Please enter the location manually:进不去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:

在这里插入图片描述

解决方法

查看swagger-ui的版本,推荐使用2.9.2版本,其他版本经常出现问题

       <dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>2.9.2</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>2.9.2</version>
		</dependency>

猜你喜欢

转载自blog.csdn.net/qq_40429067/article/details/113869741