package com.ho.gateway.config.listnerForNacosServerUpdated;

import com.alibaba.cloud.nacos.ribbon.ConditionalOnRibbonNacos;
import com.netflix.loadbalancer.ServerListUpdater;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author fancl
 * @desc:
 * @date 2022/9/20
 */
@Configuration
@ConditionalOnRibbonNacos
public class RibbonConfig {
    @Bean
    public ServerListUpdater ribbonServerListUpdater(NacosServerListListener listener) {
        return new NotificationServerListUpdater(listener);
    }
}
