class VersionLoadBalancerConfig{

    private IRuleChooser defaultRuleChooser = null;

    @Bean
    @ConditionalOnMissingBean(IRuleChooser.class)
    @ConditionalOnProperty(prefix = ConfigConstants.CONFIG_LOADBALANCE_ISOLATION, value = "chooser")
    public IRuleChooser customRuleChooser(Environment environment, ApplicationContext context){<FILL_FUNCTION_BODY>}

    @Bean
    @ConditionalOnMissingBean(value = IRuleChooser.class)
    public IRuleChooser defaultRuleChooser(){
        return new RoundRuleChooser();
    }


    @Bean
    @ConditionalOnProperty(prefix = ConfigConstants.CONFIG_LOADBALANCE_ISOLATION, name = "enabled", havingValue = "true", matchIfMissing = false)
    public ReactorServiceInstanceLoadBalancer versionServiceLoadBalancer(Environment environment
            , LoadBalancerClientFactory loadBalancerClientFactory, IRuleChooser ruleChooser){
        String name = environment.getProperty(LoadBalancerClientFactory.PROPERTY_NAME);
        return new VersionLoadBalancer(loadBalancerClientFactory.getLazyProvider(name, ServiceInstanceListSupplier.class)
                , name, ruleChooser);
    }
}


        IRuleChooser chooser = new RoundRuleChooser();
        if (environment.containsProperty(ConfigConstants.CONFIG_LOADBALANCE_ISOLATION_CHOOSER)) {
            String chooserRuleClassString = environment.getProperty(ConfigConstants.CONFIG_LOADBALANCE_ISOLATION_CHOOSER);
            if(StringUtils.isNotBlank(chooserRuleClassString)){
                try {
                    Class<?> ruleClass = ClassUtils.forName(chooserRuleClassString, context.getClassLoader());
                    chooser = (IRuleChooser) ruleClass.newInstance();
                } catch (ClassNotFoundException e) {
                    log.error("没有找到定义的选择器，将使用内置的选择器", e);
                } catch (InstantiationException e) {
                    log.error("没法创建定义的选择器，将使用内置的选择器", e);
                } catch (IllegalAccessException e) {
                    log.error("没法创建定义的选择器，将使用内置的选择器", e);
                }
            }
        }
        return chooser;
    
<no_super_class>