Remove -1 delay usage (#12767)

This commit is contained in:
Albumen Kevin 2023-07-25 20:38:36 +08:00
parent 0e17f4f168
commit d1719c5358
2 changed files with 4 additions and 1 deletions

View File

@ -640,4 +640,5 @@ public interface CommonConstants {
String SERVICE_DEPLOYER_ATTRIBUTE_KEY = "serviceDeployer";
String RESTEASY_NETTY_HTTP_REQUEST_ATTRIBUTE_KEY = "resteasyNettyHttpRequest";
String DUBBO_MANUAL_REGISTER_KEY = "dubbo.application.manual-register";
}

View File

@ -310,7 +310,9 @@ public class ServiceConfig<T> extends ServiceConfigBase<T> {
if (shouldDelay()) {
// should register if delay export
doDelayExport();
} else if (Integer.valueOf(-1).equals(getDelay())) {
} else if (
Boolean.parseBoolean(ConfigurationUtils.getProperty(
getScopeModel(), CommonConstants.DUBBO_MANUAL_REGISTER_KEY, "false"))) {
// should not register by default
doExport(RegisterTypeEnum.MANUAL_REGISTER);
} else {