Commit cf3ae735 by Dave Syer

Fix test (exclude commons refresh processing if not available)

parent 797544e6
...@@ -158,11 +158,18 @@ public class EurekaDiscoveryClientConfiguration implements SmartLifecycle, Order ...@@ -158,11 +158,18 @@ public class EurekaDiscoveryClientConfiguration implements SmartLifecycle, Order
EurekaDiscoveryClientConfiguration.this.start(); EurekaDiscoveryClientConfiguration.this.start();
} }
@EventListener(EnvironmentChangeEvent.class) @Configuration
public void onApplicationEvent(EnvironmentChangeEvent event) { @ConditionalOnClass(EnvironmentChangeEvent.class)
// register in case meta data changed protected static class EurekaClientConfigurationRefresher {
stop(); @Autowired
start(); private EurekaDiscoveryClientConfiguration clientConfig;
@EventListener(EnvironmentChangeEvent.class)
public void onApplicationEvent(EnvironmentChangeEvent event) {
// register in case meta data changed
this.clientConfig.stop();
this.clientConfig.start();
}
} }
@EventListener(ContextClosedEvent.class) @EventListener(ContextClosedEvent.class)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment