在使用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
折磨了一个小时,网上找了各种办法,包括一些在springboot启动类加上组件扫描等等,都不行
后来尝试换了一下swagger的版本,之前是2.7.0,换成2.9.2现在可以正常访问,但是原因我还不清楚,希望看到的大神可以给与帮助。
下面是我的配置:
/**
* Swagger2API文档的配置
*/
@Configuration
@EnableSwagger2
public class Swagger2Config {
@Bean
public Docket