运行github的代码后swagger怎么看

来源:1-1 摒弃千篇一律项目:前后端一体化微服务网关项目

qq_慕工程65285

2021-04-20

运行后 debug_mode="debug" 有下面两行输出

[GIN-debug] GET    /ping                     --> github.com/e421083458/go_gateway/router.InitRouter.func1 (3 handlers)
[GIN-debug] GET    /swagger/*any             --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (3 handlers)
  "errno": 1001,
  "errmsg": "not matched service",
  "data": "",
  "trace_id": "c0a832ab607ee6a681a520efc3c7f8b0",
  "stack": "github.com/e421083458/go_gateway/dao.(*ServiceManager).HTTPAccessMode\n\t
	~/go_gateway/dao/service.go:91\n
写回答

1回答

牛儿吃草

2021-04-24

你应该是把http_router和http_proxy_router,swagger属于是接口服务所以应该在http_router下面。

具体可以看一下:

github.com/e421083458/go_gateway/router/route.go

github.com/e421083458/go_gateway/http_proxy_router/route.go

0
0

(打造简历金牌项目)Vue+Go 开发企业级微服务网关项目

简历中摒弃烂大街的培训机构项目,带你开发企业级微服务网关

1316 学习 · 352 问题

查看课程