@EnableDubbo(scanBasePackages = "com.alibaba.dubbo.demo.service")
@PropertySource(value = "classpath:/provider-config.properties")
public class DemoServiceProviderBootstrap {
public static void main(String[] args) throws IOException {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.register(DemoServiceProviderBootstrap.class);
context.refresh();
System.out.println("DemoService provider is starting...");
System.in.read();
}
}
Pls. provide [GitHub address] to reproduce this issue.
Environment
Steps to reproduce this issue
dubbo.protocols.p1.id=dubbo-one dubbo.protocols.p1.name=dubbo dubbo.protocols.p1.port=20887 dubbo.protocols.p1.host=0.0.0.0 dubbo.protocols.p1.server=netty4
dubbo.protocols.p2.id=rest-two dubbo.protocols.p2.name=rest dubbo.protocols.p2.port=8087 dubbo.protocols.p2.host=0.0.0.0 dubbo.protocols.p2.server=tomcat
demo.service.version=1.0.0 demo.service.name = demoService
@DubboService(version = "${demo.service.version}" ,protocol = {"p1","p2"}) @Path("demo") public class DefaultService implements DemoService {
}
@EnableDubbo(scanBasePackages = "com.alibaba.dubbo.demo.service") @PropertySource(value = "classpath:/provider-config.properties") public class DemoServiceProviderBootstrap {
}
Pls. provide [GitHub address] to reproduce this issue.
Expected Behavior
期望nacos的服务列表中有20887和8087两个协议的端口被注册
Actual Behavior
如果使用nacos 2.0.3,每次在服务列表只能注册到其中一个协议的端口,每次是@DubboService中的protocol中后面那个能注册上
如果使用nacos 1.2.1,每次能注册上rest和dubbo两个协议对应的端口