|
|
@ -34,9 +34,10 @@ public class RegisterEnabledCondition implements Condition {
|
|
|
|
boolean isRegisterEnabled = Boolean.parseBoolean(conditionContext.getEnvironment()
|
|
|
|
boolean isRegisterEnabled = Boolean.parseBoolean(conditionContext.getEnvironment()
|
|
|
|
.getProperty("spring.cloud.polaris.discovery.register", "true"));
|
|
|
|
.getProperty("spring.cloud.polaris.discovery.register", "true"));
|
|
|
|
|
|
|
|
|
|
|
|
boolean isConsulRegisterEnabled = Boolean.parseBoolean(conditionContext.getEnvironment()
|
|
|
|
boolean isConsulRegisterEnabled = Boolean
|
|
|
|
.getProperty("spring.cloud.consul.enabled", "false")) &&
|
|
|
|
.parseBoolean(conditionContext.getEnvironment()
|
|
|
|
Boolean.parseBoolean(conditionContext.getEnvironment()
|
|
|
|
.getProperty("spring.cloud.consul.enabled", "false"))
|
|
|
|
|
|
|
|
&& Boolean.parseBoolean(conditionContext.getEnvironment()
|
|
|
|
.getProperty("spring.cloud.consul.discovery.register", "true"));
|
|
|
|
.getProperty("spring.cloud.consul.discovery.register", "true"));
|
|
|
|
|
|
|
|
|
|
|
|
isRegisterEnabled |= isConsulRegisterEnabled;
|
|
|
|
isRegisterEnabled |= isConsulRegisterEnabled;
|
|
|
|