
com.nepxion.discovery.plugin.configcenter.context.ConfigContextClosedHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discovery-plugin-config-center-starter Show documentation
Show all versions of discovery-plugin-config-center-starter Show documentation
Nepxion Discovery is a solution for Spring Cloud with blue green, gray, weight, limitation, circuit breaker, degrade, isolation, monitor, tracing, dye, failover, async agent
package com.nepxion.discovery.plugin.configcenter.context;
/**
* Title: Nepxion Discovery
* Description: Nepxion Discovery
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @version 1.0
*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import com.nepxion.discovery.plugin.configcenter.loader.RemoteConfigLoader;
public class ConfigContextClosedHandler implements ApplicationListener {
@Autowired(required = false)
private RemoteConfigLoader remoteConfigLoader;
@Override
public void onApplicationEvent(ContextClosedEvent event) {
if (remoteConfigLoader != null) {
remoteConfigLoader.unsubscribeConfig();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy