我看很多贴子都是针对eureka环境下,做静态serverList配置,目前国内大部分都用Nacos,所以便研究了一下。
micore-service-x:
ribbon:
listOfServers: ip1:port,ip2:port2
NIWSServerListClassName: com.netflix.loadbalancer.ConfigurationBasedServerList
micore-service-x: 表示你的微服务名
listOfServers:表示你的微服务实例的’ ip地址+端口’的列表,多个实例用逗号分隔,
NIWSServerListClassName:表示ServerList的类名,这个只能用ConfigurationBasedServerList, 表示使用静态配置的服务列表,而不用动态服务发现。
ConfigurationBasedServerList的核心方法就是derive


















![[集群聊天服务器]----(五)User类、UserModel类](https://img-blog.csdnimg.cn/direct/b82a6abb81044839abcac518a95d7c1a.png)

