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
EurekaDiscoveryClientConfiguration.this.start();
}
@Configuration
@ConditionalOnClass(EnvironmentChangeEvent.class)
protected static class EurekaClientConfigurationRefresher {
@Autowired
private EurekaDiscoveryClientConfiguration clientConfig;
@EventListener(EnvironmentChangeEvent.class)
public void onApplicationEvent(EnvironmentChangeEvent event) {
// register in case meta data changed
stop();
start();
this.clientConfig.stop();
this.clientConfig.start();
}
}
@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