change package or protected fields to private
fixes gh-7
This commit is contained in:
@@ -30,15 +30,19 @@ import org.springframework.core.env.Environment;
|
||||
public abstract class AbstractDiscoveryLifecycle implements DiscoveryLifecycle,
|
||||
ApplicationContextAware {
|
||||
|
||||
protected boolean autoStartup = true;
|
||||
private boolean autoStartup = true;
|
||||
|
||||
protected boolean running;
|
||||
private boolean running;
|
||||
|
||||
protected int order = 0;
|
||||
private int order = 0;
|
||||
|
||||
protected ApplicationContext context;
|
||||
private ApplicationContext context;
|
||||
|
||||
protected Environment environment;
|
||||
private Environment environment;
|
||||
|
||||
protected ApplicationContext getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext)
|
||||
@@ -47,6 +51,10 @@ public abstract class AbstractDiscoveryLifecycle implements DiscoveryLifecycle,
|
||||
this.environment = this.context.getEnvironment();
|
||||
}
|
||||
|
||||
protected Environment getEnvironment() {
|
||||
return environment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return this.autoStartup;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DiscoveryCompositeHealthIndicator extends CompositeHealthIndicator
|
||||
}
|
||||
|
||||
public static class Holder implements HealthIndicator {
|
||||
DiscoveryHealthIndicator delegate;
|
||||
private DiscoveryHealthIndicator delegate;
|
||||
|
||||
public Holder(DiscoveryHealthIndicator delegate) {
|
||||
this.delegate = delegate;
|
||||
@@ -49,6 +49,10 @@ public class DiscoveryCompositeHealthIndicator extends CompositeHealthIndicator
|
||||
public Health health() {
|
||||
return this.delegate.health();
|
||||
}
|
||||
|
||||
protected DiscoveryHealthIndicator getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,6 +79,6 @@ public class ManagementServerPortUtils {
|
||||
|| (port != 0 && port.equals(serverProperties.getPort())) ? SAME
|
||||
: DIFFERENT);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class NoopDiscoveryClientConfiguration implements
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
this.context.publishEvent(new InstanceRegisteredEvent<Environment>(this,
|
||||
this.context.publishEvent(new InstanceRegisteredEvent<>(this,
|
||||
this.environment));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user