class PluginAutoConfiguration {
    @Value("${" + DiscoveryConstant.SPRING_APPLICATION_WEIGHT_RANDOM_TYPE + ":" + DiscoveryConstant.MAP_WEIGHT_RANDOM + "}")
    private String weightRandomType;

    @Bean
    @LoadBalanced
    public RestTemplate pluginRestTemplate() {
        return new RestTemplate();
    }

    @Bean
    public PluginContextAware pluginContextAware() {
        return new PluginContextAware();
    }

    @Bean
    public PluginPublisher pluginPublisher() {
        return new PluginPublisher();
    }

    @Bean
    public PluginSubscriber pluginSubscriber() {
        return new PluginSubscriber();
    }

    @Bean
    public PluginEventWapper pluginEventWapper() {
        return new PluginEventWapper();
    }

    @Bean
    public PluginCache pluginCache() {
        return new PluginCache();
    }

    @Bean
    public RuleCache ruleCache() {
        return new RuleCache();
    }

    @Bean
    @ConditionalOnMissingBean
    public RuleWeightRandomLoadBalance<WeightFilterEntity> ruleWeightRandomLoadBalance(PluginAdapter pluginAdapter) {
        WeightRandomType type = WeightRandomType.fromString(weightRandomType);

        switch (type) {
            case MAP_WEIGHT_RANDOM:
                return new RuleMapWeightRandomLoadBalance(pluginAdapter);
            case ARRAY_WEIGHT_RANDOM:
                return new RuleArrayWeightRandomLoadBalance(pluginAdapter);
        }

        return null;
    }

    @Bean
    @ConditionalOnMissingBean
    public StrategyWeightRandomLoadBalance<WeightFilterEntity> strategyWeightRandomLoadBalance(PluginAdapter pluginAdapter, @Autowired(required = false) PluginContextHolder pluginContextHolder) {
        WeightRandomType type = WeightRandomType.fromString(weightRandomType);

        switch (type) {
            case MAP_WEIGHT_RANDOM:
                return new StrategyMapWeightRandomLoadBalance(pluginAdapter, pluginContextHolder);
            case ARRAY_WEIGHT_RANDOM:
                return new StrategyArrayWeightRandomLoadBalance(pluginAdapter, pluginContextHolder);
        }

        return null;
    }

    @Bean
    @ConditionalOnMissingBean
    public WeightRandomProcessor<String> strategyWeightRandomProcessor() {<FILL_FUNCTION_BODY>}

    @Bean
    public RegisterListenerExecutor registerListenerExecutor() {
        return new RegisterListenerExecutor();
    }

    @Bean
    public DiscoveryListenerExecutor discoveryListenerExecutor() {
        return new DiscoveryListenerExecutor();
    }

    @Bean
    public LoadBalanceListenerExecutor loadBalanceListenerExecutor() {
        return new LoadBalanceListenerExecutor();
    }

    @Bean
    @ConditionalOnMissingBean
    public HostFilterRegisterListener hostFilterRegisterListener() {
        return new HostFilterRegisterListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public CountFilterRegisterListener countFilterRegisterListener() {
        return new CountFilterRegisterListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public HostFilterDiscoveryListener hostFilterDiscoveryListener() {
        return new HostFilterDiscoveryListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public VersionFilterDiscoveryListener versionFilterDiscoveryListener() {
        return new VersionFilterDiscoveryListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public RegionFilterDiscoveryListener regionFilterDiscoveryListener() {
        return new RegionFilterDiscoveryListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public HostFilterLoadBalanceListener hostFilterLoadBalanceListener() {
        return new HostFilterLoadBalanceListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public VersionFilterLoadBalanceListener versionFilterLoadBalanceListener() {
        return new VersionFilterLoadBalanceListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public RegionFilterLoadBalanceListener regionFilterLoadBalanceListener() {
        return new RegionFilterLoadBalanceListener();
    }

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnProperty(value = DiscoveryConstant.SPRING_APPLICATION_NO_SERVERS_NOTIFY_ENABLED, matchIfMissing = false)
    public NotificationLoadBalanceListener notificationLoadBalanceListener() {
        return new NotificationLoadBalanceListener();
    }

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnProperty(value = DiscoveryConstant.SPRING_APPLICATION_GROUP_GENERATOR_ENABLED, matchIfMissing = false)
    public GroupGenerator groupGenerator() {
        return new GroupGenerator();
    }

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnProperty(value = DiscoveryConstant.SPRING_APPLICATION_GIT_GENERATOR_ENABLED, matchIfMissing = false)
    public GitGenerator gitGenerator() {
        return new GitGenerator();
    }
}

        WeightRandomType type = WeightRandomType.fromString(weightRandomType);

        switch (type) {
            case MAP_WEIGHT_RANDOM:
                return new MapWeightRandomProcessor<String>();
            case ARRAY_WEIGHT_RANDOM:
                return new ArrayWeightRandomProcessor<String>();
        }

        return null;
    
<no_super_class>