W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
參考文章《Dubbo 邁出云原生重要一步 應用級服務發(fā)現(xiàn)解析》
參考倉庫:dubbo-go-samples/registry/serivcediscovery
dubbo: registries: demoZK: protocol: nacos address: 127.0.0.1:8848 registry-type: service # 指定該注冊中心為應用級服務發(fā)現(xiàn),不填默認為接口級 metadata-report: # 定義元數(shù)據(jù)中心 protocol: nacos # 元數(shù)據(jù)中心可選nacos/zk address: 127.0.0.1:8848 consumer: references: GreeterClientImpl: protocol: tri interface: com.apache.dubbo.sample.basic.IGreeter
dubbo: registries: demoZK: protocol: nacos address: 127.0.0.1:8848 registry-type: service # 指定該注冊中心為應用級服務發(fā)現(xiàn),不填默認為接口級 metadata-report: # 定義元數(shù)據(jù)中心 protocol: nacos # 元數(shù)據(jù)中心可選nacos/zk address: 127.0.0.1:8848 protocols: triple: name: tri port: 20000 provider: services: GreeterProvider: interface: com.apache.dubbo.sample.basic.IGreeter
相比于常規(guī)配置,定義好registry-type: service, 并且定義好元數(shù)據(jù)中心后,將會使用應用級服務注冊/服務發(fā)現(xiàn)。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: