使用注解方式在多注册中心的问题

使用注解方式在多注册中心中需要有两个RegistryConfig,但是会提示required a single bean, but 2 were found...Action: Consider marking one of the beans as @primary, updating the consumer to accept multiple beans, or using @qualifier to identify the bean that should be consumed 使用了@primary注解,也不起作用

原提问者GitHub用户BrightMi

展开
收起
大圣东游 2023-05-11 20:27:27 130 分享 版权
1 条回答
写回答
取消 提交回答
  • 请尝试指定为registry指定id,service中配置registry="id1,id2"

    原回答者GitHub用户chickenlj

    2023-05-12 12:15:04
    赞同 展开评论
问答地址: