All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.redkalex.properties.nacos.NacosClientPropertiesAgentProvider Maven / Gradle / Ivy

There is a newer version: 2.7.7
Show newest version
/*
 */
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