You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "haiyang1985 (GitHub)" <gi...@apache.org> on 2019/09/19 09:28:20 UTC
[GitHub] [dubbo] haiyang1985 commented on issue #5063:
[Dubbo-5049]support @Bean on Config class to config id as alias
The PR have not solved my issue. When user defined ProtocolConfig as a spring bean , service annotation cannot get the dubbo bean id.
```
@Service(protocol = "dubbo1")
public class DubboDemoServiceImpl implements DubboDemoService {
}
```
```
@Configuration
public class DubboConfiguration {
@Bean
public ProtocolConfig getConfig() {
ProtocolConfig config = new ProtocolConfig();
config.setId("dubbo1");
config.setName("dubbo");
config.setPort(20770);
return config;
}
}
```
I've tried your solution in my local, still not able to get dubbo bean id.
```
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean named 'dubbo1' that could not be found.
```
[ Full content available at: https://github.com/apache/dubbo/pull/5063 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org