chickenlj commented on code in PR #14874:
URL: https://github.com/apache/dubbo/pull/14874#discussion_r1859653304


##########
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java:
##########
@@ -782,14 +782,17 @@ public void prepareApplicationInstance(ModuleModel 
moduleModel) {
         // export MetricsService
         exportMetricsService();
 
-        if (moduleModel.getDeployer().hasRegistryInteraction()) {
+        boolean registryConfiged = CollectionUtils.isNotEmpty(
+                
moduleModel.getApplicationModel().getApplicationConfigManager().getRegistries());
+
+        if (registryConfiged) {

Review Comment:
   Comparing to `hasRegistryInteraction()`, the new condition missed to check 
the registry configuration that is restricted in ServiceConfig. So this change 
might fix the registration issue for users programmatically using API but 
probably will cause new issue for users exporting services the other way.



-- 
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]

Reply via email to