dubbo入门

xml开发??

no!

注解开发??

yes!

什么叫持续的学习能力?2022新出的dubbo3又得学,他妈的

等教程完善了再说吧

config

@EnableDubbo开启dubbo

application配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
dubbo:
application:
name: [dubbo-springboot-demo-provider]
protocol:
name: [dubbo|tri]
port: [port]
registry:
id: [zk-registry]
address: zookeeper://127.0.0.1:2181
config-center:
address: zookeeper://127.0.0.1:2181
metadata-report:
address: zookeeper://127.0.0.1:2181

provider

service层注解改@DubboService(version = "[version]")

consumer

resource注解改@DubboReference(version = "[version]")

StreamOberver

里面有个onNext,onError,onCompleted方法