启动swagger报错Unable to infer base url. This is common when using dynamic servlet....

出现这个弹窗,不是什么版本问题,也不是什么bug,只需要改掉tomcat配置里的访问路径就可以了.启动swagger报错Unable to infer base url. This is common when using dynamic servlet....

如上图,直接在后面跟上swagger-ui.html就可以正常启动了,不需要在8080/后面加项目名!!!

我是这么解决的,希望可以帮到大家,

补充,早前发以上文章时,了解也不够全面,现在补上后续

-——————————————————————————————————————————————————

注意需要该Config类(swagger的配置类)所处的包要被springboot启动时扫描到swagger2才能生效。

否则会出现如下提示 
启动swagger报错Unable to infer base url. This is common when using dynamic servlet....

相关文章:

  • 2021-12-03
  • 2021-12-20
  • 2021-11-10
  • 2021-04-30
  • 2021-06-19
  • 2021-09-19
  • 2021-07-06
猜你喜欢
  • 2022-12-23
  • 2021-05-22
  • 2021-05-28
  • 2021-06-05
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
相关资源
相似解决方案