nanjiek commented on code in PR #2942:
URL: https://github.com/apache/dubbo-go/pull/2942#discussion_r2249951010
##########
registry/directory/directory.go:
##########
@@ -575,14 +576,27 @@ type consumerConfigurationListener struct {
directory *RegistryDirectory
}
-func newConsumerConfigurationListener(dir *RegistryDirectory)
*consumerConfigurationListener {
+func newConsumerConfigurationListener(dir *RegistryDirectory, url *common.URL)
*consumerConfigurationListener {
listener := &consumerConfigurationListener{directory: dir}
+
+ // TODO: Temporary compatibility with old APIs, can be removed later
application := config.GetRootConfig().Application
listener.InitWith(
application.Name+constant.ConfiguratorSuffix,
listener,
extension.GetDefaultConfiguratorFunc(),
)
+
+ if ApplicationConfRaw, ok := url.GetAttribute(constant.ApplicationKey);
ok {
Review Comment:
I demonstrated the way to initialize applicationconfig in directory_test. If
the user does not set the attributes related to applicationconfig in the url,
The default applicationconfig in global will be used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]