弹窗内容
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
然后查了下可能有多种原因
①swaager配置文件忘记加@EnableSwagger2注解
②在application启动类中未定义@EnableSwagger2注解
③在swaager配置文件中添加注解@ComponentScan({ "com.*.*.mapper" })
④在application启动类中添加注解@ComponentScan({ "com.*.*.mapper" })
注:*代表你的包名,不是真的星星,你要是真写**,那你就真是**
排除1,2,在swagger中加入无效
测试第四种ok了