【问题标题】:http://localhost:8080/swagger-ui.html#/ 406 - Not Acceptablehttp://localhost:8080/swagger-ui.html#/ 406 - 不可接受
【发布时间】:2018-07-23 14:18:34
【问题描述】:

http://localhost:8080/swagger-ui.html#/ deosn;t 显示 Ui 页面。“406 - Not Acceptable”是错误。但 http://localhost:8080/v2/api-docs 和 /swagger-resources 工作正常,没有错误。

依赖项中没有重复项。

应该是什么问题?

【问题讨论】:

标签: swagger-ui


【解决方案1】:

在 Startup.cs 的 ConfigureServices 中添加以下行

services.AddMvcCore().AddJsonFormatters().AddApiExplorer();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-22
    • 1970-01-01
    • 2016-04-22
    • 1970-01-01
    • 2015-07-10
    • 2019-04-30
    • 2015-03-17
    • 1970-01-01
    相关资源
    最近更新 更多