首页 > 解决方案 > 如何找到招摇的路径

问题描述

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

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

标签: spring-mvcswagger-uiswagger-2.0

解决方案


您可以使用以下方法:

  1. 使用命令在节点包 http-server 上全局安装 -npm install -g http-server
  2. http-server --cors将目录更改为所在your.json位置后运行
  3. 打开swagger ui(即dist/index.html)
  4. http://localhost:8080/your.json放在输入字段中,然后单击“探索”

推荐阅读