org.redkalex.properties.nacos.NacosClientPropertiesAgentProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redkale-plugins Show documentation
Show all versions of redkale-plugins Show documentation
Redkale-Plugins -- java framework
/*
*/
package org.redkalex.properties.nacos;
import org.redkale.annotation.Priority;
import org.redkale.props.spi.PropertiesAgent;
import org.redkale.props.spi.PropertiesAgentProvider;
import org.redkale.util.*;
/** @author zhangjx */
@Priority(-800)
public class NacosClientPropertiesAgentProvider implements PropertiesAgentProvider {
@Override
public boolean acceptsConf(AnyValue config) {
try {
Object.class.isAssignableFrom(com.alibaba.nacos.api.config.ConfigService.class); // 试图加载相关类
return new NacosClientPropertiesAgent().acceptsConf(config);
} catch (Throwable t) {
return false;
}
}
@Override
public PropertiesAgent createInstance() {
return new NacosClientPropertiesAgent();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy