|
|
@ -95,9 +95,12 @@ public class EurekaDiscoveryClientConfiguration implements SmartLifecycle, Order |
|
|
|
if (!this.running.get() && this.instanceConfig.getNonSecurePort() > 0) { |
|
|
|
if (!this.running.get() && this.instanceConfig.getNonSecurePort() > 0) { |
|
|
|
|
|
|
|
|
|
|
|
this.eurekaClient.getApplications(); // force initialization
|
|
|
|
this.eurekaClient.getApplications(); // force initialization
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (log.isInfoEnabled()) { |
|
|
|
log.info("Registering application " + this.instanceConfig.getAppname() |
|
|
|
log.info("Registering application " + this.instanceConfig.getAppname() |
|
|
|
+ " with eureka with status " |
|
|
|
+ " with eureka with status " |
|
|
|
+ this.instanceConfig.getInitialStatus()); |
|
|
|
+ this.instanceConfig.getInitialStatus()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.applicationInfoManager |
|
|
|
this.applicationInfoManager |
|
|
|
.setInstanceStatus(this.instanceConfig.getInitialStatus()); |
|
|
|
.setInstanceStatus(this.instanceConfig.getInitialStatus()); |
|
|
@ -114,8 +117,12 @@ public class EurekaDiscoveryClientConfiguration implements SmartLifecycle, Order |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stop() { |
|
|
|
public void stop() { |
|
|
|
if (this.applicationInfoManager.getInfo() != null) { |
|
|
|
if (this.applicationInfoManager.getInfo() != null) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (log.isInfoEnabled()) { |
|
|
|
log.info("Unregistering application " + this.instanceConfig.getAppname() |
|
|
|
log.info("Unregistering application " + this.instanceConfig.getAppname() |
|
|
|
+ " with eureka with status DOWN"); |
|
|
|
+ " with eureka with status DOWN"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.applicationInfoManager.setInstanceStatus(InstanceStatus.DOWN); |
|
|
|
this.applicationInfoManager.setInstanceStatus(InstanceStatus.DOWN); |
|
|
|
} |
|
|
|
} |
|
|
|
this.running.set(false); |
|
|
|
this.running.set(false); |
|
|
|