Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceLiZhixin committed Nov 6, 2021
1 parent 27aaaa9 commit 9f811e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/root_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func registerPOJO() {
hessian.RegisterPOJO(&common.URL{})
}

// Init is to start dubbo-go framework, load local configuration, or read configuration from config-center if necessary.
// finally, for using config-builder to build root config, it would set this root config to global root config pointer,
// allowing global call like GetMetadataConfig works.
func (rc *RootConfig) Init() error {
registerPOJO()
if err := rc.Logger.Init(); err != nil { // init default logger
Expand Down Expand Up @@ -188,6 +191,7 @@ func (rc *RootConfig) Init() error {
if err := rc.Consumer.Init(rc); err != nil {
return err
}
rootConfig = rc
// todo if we can remove this from Init in the future?
rc.Start()
return nil
Expand Down

0 comments on commit 9f811e9

Please sign in to comment.