dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IronCity (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] IronCity opened issue #3082: 建议注解可以和XML配置一样,直接注入一个springbean,方便业务服务无改动使用
Date Thu, 27 Dec 2018 11:27:53 GMT
### Environment

* Dubbo version: 2.6.X 2.7.X 
* Operating System version: mac
* Java version: 1.8

### 情景
#### 我们正常使用
```Java
@Service
public class DemoService {

    @Reference(version = "1.2.3")
    private XXService xxService;

}
```

#### 期望使用
```Java
@Configuration
public class DubboConfig {

     @ReferenceConsumer(version = "1.2.3")
     private XXService xxService;

}

@Service
public class BXXServiceImpl {
    
    @Autowired
    private XXService xxService; 

}

@Service
public class AXXServiceImpl {
    
    @Autowired
    private XXService xxService; 

}
```

希望能够用spring的方式去注入对象,目前dubbo通过XML配置是注册到spring的bean,但是@Reference并不是。
想法是加一个PostProcessor去做一次registry一个BeanDefinition


[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3082 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
Mime
View raw message