如何找到招摇的路径

how to find the swagger path

我有以下 swagger 配置。现在我在浏览器中打开 swagger-ui 的 swagger 路径是什么。

            .select()
            .apis(RequestHandlerSelectors.any())
            .paths(PathSelectors.regex(".*/v2/accounts/.*"))
            .build()
            .securitySchemes(Collections.singletonList(apiKey()))
            .securityContexts(Collections.singletonList(securityContext()));

您可以使用以下方法:

  1. 使用命令在节点包 http-server 上全局安装 - npm install -g http-server
  2. 运行 http-server --cors 将目录更改为 your.json 所在的位置后
  3. 张扬ui(即dist/index.html)
  4. 输入http://localhost:8080/your.json然后点击"Explore"