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 2021/09/14 02:23:17 UTC

[GitHub] [dubbo] FelixLiuSheng opened a new issue #8792: dubbo consumer 在注入spring bean时,无法注入相关的service

FelixLiuSheng opened a new issue #8792:
URL: https://github.com/apache/dubbo/issues/8792


   ### Environment
   
   * Dubbo version: 3.0.2/3.0.2.1
   * Operating System version: macos big sur 11.5
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. 定义一个XXXFilter implements org.apache.dubbo.rpc.Filter
   2. 在XXXFilter 里定义一个 属性 xxService(需要有一个实现xxService 并增加spring 的@Service注解)
   3. 增加一个属性的set方法xxService
   4. 启动消费者后,会发现XXXFilter中的xxService并未被实例化,还是null(同理提供者是正常的)
   
   ### 问题原因
   最开始设置上下文的地方在DubboInfraBeanRegisterPostProcessor#setApplicationContex中,这里将上下文设置进SpringExtensionFactory。后面调用SpringExtensionFactory#initialize()就会清掉,而consumer端后面没有地方再设置(configCenter没配的情况下)
   ```
   


-- 
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


[GitHub] [dubbo] CrazyHZM commented on issue #8792: dubbo consumer 在注入spring bean时,无法注入相关的service

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #8792:
URL: https://github.com/apache/dubbo/issues/8792#issuecomment-921637926


   Suspected of the same issues:#8793


-- 
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


[GitHub] [dubbo] chickenlj closed issue #8792: dubbo consumer 在注入spring bean时,无法注入相关的service

Posted by GitBox <gi...@apache.org>.
chickenlj closed issue #8792:
URL: https://github.com/apache/dubbo/issues/8792


   


-- 
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