main.go 476 B

12345678910111213141516171819202122232425262728
  1. package main
  2. import (
  3. "demo/configs"
  4. "demo/router"
  5. "fmt"
  6. "github.com/gin-gonic/gin"
  7. )
  8. func init() {
  9. configs.ConfigInit()
  10. }
  11. func main() {
  12. runGin()
  13. }
  14. // 接口前缀
  15. func runGin() {
  16. Router := gin.Default()
  17. apiGroup := Router.Group(router.Prefix)
  18. router.InitRouter(apiGroup, Router)
  19. router.InitAuthority(Router)
  20. fmt.Println("router.PathIRouterMap===>", router.PathIRouterMap)
  21. fmt.Println("router.PathRouterMap====>", router.PathRouterMap)
  22. Router.Run(":8182")
  23. }