deep-in-spring-cloud-samples icon indicating copy to clipboard operation
deep-in-spring-cloud-samples copied to clipboard

关于灰度发布中的配置错误问题

Open xuxiaowei-com-cn opened this issue 4 years ago • 3 comments
trafficstars

在灰度发布配置时,不应该使用 NacosRibbonEnhanceConsumer 中的 @Bean public IRule myRule() { return new GrayRule(); } 此方式会导致在多个不同名称的服务中的路由分配时出现错误(调用服务A,该路由分配到了服务B上),应使用 @RibbonClients(defaultConfiguration = {GrayRule.class}) 若不同服务使用不同的路由,可使用 @RibbonClients(value = { @RibbonClient(name = "A", configuration = GrayRuleA.class), @RibbonClient(name = "B", configuration = GrayRuleB.class) })

xuxiaowei-com-cn avatar Feb 22 '21 11:02 xuxiaowei-com-cn

是的,直接基于 @Bean 构造 IRule 有一点点粗暴 ~ 感谢更正!

fangjian0423 avatar Feb 25 '21 11:02 fangjian0423

是的,直接基于@bean构造IRule有一点点粗暴〜感谢更正!

不用谢,请尽快更新源码即可。

xuxiaowei-com-cn avatar Feb 25 '21 12:02 xuxiaowei-com-cn

是的,直接基于@bean构造IRule有一点点粗暴〜感谢更正!

已创建了合并请求。

xuxiaowei-com-cn avatar Feb 25 '21 13:02 xuxiaowei-com-cn