继前篇博客后,打开http://localhost:8080/swagger-ui.html#/api/user出现
出现的主要原因是:扫描不到swaggerConfig所在的路径,所以需要在启动类的ComponentScan中加入类的路径
解决方法:
将componentScan里的路径改为SwaggerConfig类所在的包的路径
然后将SwaggerConfig类中RequestHandlerSelectors.basePackage里的路径改为控制类的路径
Unable to infer base url. This is common when using dynamic servlet registration or when the API is
最新推荐文章于 2023-08-21 17:45:17 发布