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/10/21 08:05:42 UTC

[GitHub] [dubbo] shuohao opened a new issue, #10780: 升级版本后原先扩展Filter的代码,setter注入的属性为空

shuohao opened a new issue, #10780:
URL: https://github.com/apache/dubbo/issues/10780

   对比了一下dubbo版本代码后发现SpringExtensionInjector  
   ![image](https://user-images.githubusercontent.com/4637107/197145006-6906fcc5-4e03-4ed2-931e-b023760a7cb3.png)
   原先代码是先根据name查询bean,查不到再根据类型type去查找,但是新版的只要name不为空就不会根据type去查即便查不到,比如我们这个原先代码
   ![image](https://user-images.githubusercontent.com/4637107/197145415-d78f340d-4525-4fef-a68c-50e908f9efa4.png)
   注入了applicationConfig和providerConfig,根据applicationConfig查不到因为我们配置了dubbo.application.name为我们项目名,所以这里代码就会报空


-- 
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.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] liufeiyu1002 commented on issue #10780: 升级版本后原先扩展Filter的代码,setter注入的属性为空

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

   1.要确认 spring 容器中已经注入了  ApplicationConfig 类型的类
   2.查看注入容器中时对应的 key 是什么
   3.如果确认在容器中存在 可以把 set 方法  setxxx  xxx 替换为容器中对应类的 key 的名称


-- 
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] githublaohu commented on issue #10780: 升级版本后原先扩展Filter的代码,setter注入的属性为空

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

   > > 1.要确认 spring 容器中已经注入了 ApplicationConfig 类型的类 2.查看注入容器中时对应的 key 是什么 3.如果确认在容器中存在 可以把 set 方法 setxxx xxx 替换为容器中对应类的 key 的名称
   > 
   > 1.已经注入了 2.key是业务名称 3.因为提供的是扩展starter,没法写死
   
   大佬,你是想要name可以从'beanFactory'获得对象是吗?


-- 
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] shuohao commented on issue #10780: 升级版本后原先扩展Filter的代码,setter注入的属性为空

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

   > 1.要确认 spring 容器中已经注入了 ApplicationConfig 类型的类 2.查看注入容器中时对应的 key 是什么 3.如果确认在容器中存在 可以把 set 方法 setxxx xxx 替换为容器中对应类的 key 的名称
   
   1.已经注入了  2.key是业务名称  3.因为提供的是扩展starter,没法写死


-- 
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] samyScott commented on issue #10780: 升级版本后原先扩展Filter的代码,setter注入的属性为空

Posted by "samyScott (via GitHub)" <gi...@apache.org>.
samyScott commented on issue #10780:
URL: https://github.com/apache/dubbo/issues/10780#issuecomment-1408265386

   please assign to me 


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