chunjie
V2EX  ›  问与答

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

  •  
  •   chunjie · Oct 3, 2018 · 11629 views
    This topic created in 2781 days ago, the information mentioned may be changed or developed.

    访问 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 replies    2018-10-03 13:39:47 +08:00
    chunjie
        1
    chunjie  
    OP
       Oct 3, 2018
    妈的,原来是个 bug,清理浏览器缓存就行了。。。
    Exin
        2
    Exin  
       Oct 3, 2018   ❤️ 1
    暴躁老哥
    wemore
        3
    wemore  
       Oct 3, 2018 via Android
    消消气,之前用遇到蜜汁 bug。提示加载失败啥的,最后发现参数里不能用 boolean😂
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2935 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 14:19 · PVG 22:19 · LAX 07:19 · JFK 10:19
    ♥ Do have faith in what you're doing.