Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xuxiaowei-com-cn opened this issue Feb 22, 2021 · 3 comments
Open

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

xuxiaowei-com-cn opened this issue Feb 22, 2021 · 3 comments

Comments

@xuxiaowei-com-cn
Copy link
Contributor

在灰度发布配置时,不应该使用 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) })

@fangjian0423
Copy link
Owner

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

@xuxiaowei-com-cn
Copy link
Contributor Author

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

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

@xuxiaowei-com-cn
Copy link
Contributor Author

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

已创建了合并请求。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants