You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "shelltea (GitHub)" <gi...@apache.org> on 2019/01/18 03:39:42 UTC
[GitHub] [incubator-dubbo-spring-boot-project] shelltea opened issue #400: 通过@Reference方式注入服务没有在Spring的容器中
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
It's not a bug, because `@Reference` does not enhancement inject object as a Spring Bean, that's why `BeanFactory` can't retrieve them by type.
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
```java
@Bean
public ReferenceBean<YourBean> yourBean(){
ReferenceBean<YourBean> yourBean = new ReferenceBean<YourBean>();
...
reutrn yourBean;
}
```
more details please refer this document: http://dubbo.apache.org/zh-cn/docs/user/configuration/api.html
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz closed issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
[ issue closed by mercyblitz ]
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
You can define a Spring Bean for `ReferenceBean`.
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
It's not a bug, because `@Reference` does not enhance the injected object as a Spring Bean, that's why `BeanFactory` can't retrieve them by type.
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] amit-gshe commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "amit-gshe (GitHub)" <gi...@apache.org>.
#232 also referenced this issue.
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] amit-gshe commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "amit-gshe (GitHub)" <gi...@apache.org>.
I did try this way but I did not find an existing property class I can use to define a spring bean for `ReferenceBean`. Could you please demonstrate how to define a `@ReferenceBean` manaually?
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] amit-gshe commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "amit-gshe (GitHub)" <gi...@apache.org>.
Is there a way to construct a `@Reference` bean defination manaually in spring boot fashion?
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo-spring-boot-project] amit-gshe commented on issue #400: 通过@Reference方式注入服务没有在Spring的容器中
Posted by "amit-gshe (GitHub)" <gi...@apache.org>.
#232 also referenced this issue but its solution seems not working by the official sample
[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/400 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org