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

org.redkalex.properties.apollo.ApolloClientPropertiesAgentProvider Maven / Gradle / Ivy

There is a newer version: 2.7.7
Show newest version
/*
 */
package org.redkalex.properties.apollo;

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 ApolloClientPropertiesAgentProvider implements PropertiesAgentProvider {

    @Override
    public boolean acceptsConf(AnyValue config) {
        try {
            Object.class.isAssignableFrom(com.ctrip.framework.apollo.core.ConfigConsts.class); // 试图加载相关类
            return new ApolloClientPropertiesAgent().acceptsConf(config);
        } catch (Throwable t) {
            return false;
        }
    }

    @Override
    public PropertiesAgent createInstance() {
        return new ApolloClientPropertiesAgent();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy