Skip to content

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

@xuxiaowei-com-cn

Description

@xuxiaowei-com-cn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions