Closed moooofly closed 5 years ago
在 《3.8 为它加上Swagger》中缺失了针对 router 创建和 index.html 文件相关的说明,因此,按照教程访问时,只能得到 404 ;
参考 https://github.com/EDDYCJY/go-gin-example/blob/dfa46b5fa6f35eab84a3f84502bfe6a6aa0c7b20/routers/router.go 知道
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
ginSwagger "github.com/swaggo/gin-swagger"
import _ "github.com/xxx/xxx/docs"
swag init
在 《3.8 为它加上Swagger》中缺失了针对 router 创建和 index.html 文件相关的说明,因此,按照教程访问时,只能得到 404 ;