Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

springboot dubbo不支持protobuf吗? #769

Open
ken821021 opened this issue Dec 31, 2020 · 1 comment
Open

springboot dubbo不支持protobuf吗? #769

ken821021 opened this issue Dec 31, 2020 · 1 comment

Comments

@ken821021
Copy link

ken821021 commented Dec 31, 2020

`@DubboService
public class ProtoDemoService implements ProtoDemoServiceDubbo.IProtoDemoService {

@Value("${dubbo.application.name}")
private String serverName;


@Override
public HelloReply sayHello(HelloRequest request) {
    HelloReply.Builder builder = HelloReply.newBuilder();
    builder.setMessage("Hello " + request.getName() + ":" + serverName);
    return builder.build();
}

@Override
public CompletableFuture<HelloReply> sayHelloAsync(HelloRequest request) {
    return CompletableFuture.completedFuture(sayHello(request));
}

}
`
注册中心没有注册服务,启动consumer提示:
Failed to check the status of the service hk.grwth.vod.rpc.ProtoDemoServiceDubbo$IProtoDemoService. No provider available for the service hk.grwth.vod.rpc.ProtoDemoServiceDubbo$IProtoDemoService

@ken821021
Copy link
Author

https://github.com/apache/dubbo-samples/tree/master/dubbo-samples-protobuf
用这个sample结合nacos会报:
[31/12/20 17:05:31:417 CST] com.alibaba.nacos.naming.beat.sender ERROR client.naming: [NA] failed to request ErrCode:400, ErrMsg:caused: dom name can only have these characters: 0-9a-zA-Z-._:, current: DEFAULT_GROUP@@providers:org.apache.dubbo.demo.DemoServiceDubbo$IDemoService::;
😄,貌似是nacos的锅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant