You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/25 05:41:23 UTC

[GitHub] [dubbo] liufeiyu1002 commented on issue #10362: 混合使用注解和XML配置导致出现两个application实例(Mixing annotations and XML configuration results in two instances of application)

liufeiyu1002 commented on issue #10362:
URL: https://github.com/apache/dubbo/issues/10362#issuecomment-1193605162

   1. @EnableDubbo 注解里默认会注入一个application, 你通过xml手动注入一个application 对象 导致容器中 会存在俩个application对象,且都没设置@Primary注解 导致从spring 中获取的时候不知道拿哪一个
   2. 如果要使用@EnableDubbo  注解 即不需要配置xml,如果想使用dubbo注解和 xml 结合 则 不适用@EnableDubbo注解,在dubboxml中配置 <dubbo:annotation/>标签来支持注解


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org