【问题标题】:Beego API Document swagger returns 404Beego API Document 招摇返回 404
【发布时间】:2014-10-15 19:59:20
【问题描述】:

我正在关注blogvideo做API演示,当我访问时

http://127.0.0.1:8080/swagger I can see the link

/swagger-1/

但是当我点击它时,它返回 404。有人知道吗?

【问题讨论】:

    标签: swagger beego


    【解决方案1】:

    这是一个错误。

    一般可以通过访问看到Beego自动生成的swagger文档

    http://127.0.0.1:8080/swagger/swagger-1/
    

    问题是如果您访问过

    http://127.0.0.1:8080/swagger 
    

    点击链接后会跳转到

    http://127.0.0.1:8080/swagger-1/ 
    

    这将返回 404。

    但是,如果您访问过

    http://127.0.0.1:8080/swagger/ 
    

    点击链接后会跳转到

    http://127.0.0.1:8080/swagger/swagger-1/ 
    

    这将为您提供所需的文件。

    【讨论】:

      【解决方案2】:

      下载此链接https://github.com/beego/swagger 并将其放入您的项目中。那就去http://localhost:8080/swagger/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-12-24
        • 2023-03-11
        • 1970-01-01
        • 2020-02-02
        • 1970-01-01
        • 2018-08-22
        相关资源
        最近更新 更多