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

pro.chenggang.plugin.springcloud.gateway.config.GatewayPluginConfigurationSelector Maven / Gradle / Ivy

There is a newer version: 2.1.SR2.2.RELEASE
Show newest version
package pro.chenggang.plugin.springcloud.gateway.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import java.util.ArrayList;
import java.util.List;

/**
 * Gateway Plugin Configuration Seelector
 * @author chenggang
 * @date 2019/01/29
 */
@Slf4j
public class GatewayPluginConfigurationSelector implements ImportSelector {

    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        List configClassList = new ArrayList<>(7);
        configClassList.add(GatewayPluginConfig.class);
        configClassList.add(RequestResponseLogConfig.class);
        configClassList.add(GreyRouteConfig.class);
        configClassList.add(GreyDefaultRoundRuleConfig.class);
        configClassList.add(GreyWeightResponseRuleConfig.class);
        configClassList.add(GlobalExceptionJsonHandlerConfig.class);
        return configClassList.stream().map(Class::getName).toArray(String[]::new);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy