Skip to content

Commit

Permalink
调整框架初始化的优先级
Browse files Browse the repository at this point in the history
  • Loading branch information
yumaojun03 committed Mar 15, 2024
1 parent 4edf47e commit 582057c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ioc/config/gin/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ func (g *GinFramework) Init() error {
return nil
}

func (i *GinFramework) Priority() int {
return 99
}

func (g *GinFramework) Name() string {
return AppName
}
5 changes: 5 additions & 0 deletions ioc/config/gorestful/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ func init() {

type GoRestfulFramework struct {
ioc.ObjectImpl

Container *restful.Container
}

func (i *GoRestfulFramework) Priority() int {
return 99
}

func (g *GoRestfulFramework) Init() error {
g.Container = restful.DefaultContainer
restful.DefaultResponseContentType(restful.MIME_JSON)
Expand Down

0 comments on commit 582057c

Please sign in to comment.