V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
chunjie
V2EX  ›  问与答

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

  •  
  •   chunjie · 2018-10-03 02:33:41 +08:00 · 10754 次点击
    这是一个创建于 2003 天前的主题,其中的信息可能已经有所发展或是发生改变。

    访问 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 再次开启就弹出提示框了,无法用了!!!怎么复原回去啊?

    3 条回复    2018-10-03 13:39:47 +08:00
    chunjie
        1
    chunjie  
    OP
       2018-10-03 11:49:54 +08:00
    妈的,原来是个 bug,清理浏览器缓存就行了。。。
    Exin
        2
    Exin  
       2018-10-03 12:16:12 +08:00   ❤️ 1
    暴躁老哥
    wemore
        3
    wemore  
       2018-10-03 13:39:47 +08:00 via Android
    消消气,之前用遇到蜜汁 bug。提示加载失败啥的,最后发现参数里不能用 boolean😂
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3173 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:19 · PVG 20:19 · LAX 05:19 · JFK 08:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.