气炸了, swagger 突然弹个框什么意思?

2018-10-03 02:33:41 +08:00
 chunjie

访问 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:

这到底是什么怎么回事? 我原本用的是 2.22 版,导入:

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.2.2</version>
    </dependency>

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

后来改为 2.9.2 版后觉得界面接收不了又改回 2.22 版 ,结果 swagger 再次开启就弹出提示框了,无法用了!!!怎么复原回去啊?

10789 次点击
所在节点    问与答
3 条回复
chunjie
2018-10-03 11:49:54 +08:00
妈的,原来是个 bug,清理浏览器缓存就行了。。。
Exin
2018-10-03 12:16:12 +08:00
暴躁老哥
wemore
2018-10-03 13:39:47 +08:00
消消气,之前用遇到蜜汁 bug。提示加载失败啥的,最后发现参数里不能用 boolean😂

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/494662

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX