增加dubbo配置
dubbo:
application:
name: gotest
module: gotest
group: dao
organization: qiudaozhang
owner: qiudaozhang
version: 0.1
environment: pro
registries:
nacosWithCustomGroup:
protocol: nacos # 注册中心选择 nacos
address: 127.0.0.1:8848 # nacos ip
group: RIDE # nacos group, 默认 DEFAULT_GROUP
namespace: 1cdfdf5b-562e-48c9-91f7-a200cc7e192e # nacos namespaceID, should be created before. 默认public
username: nacos
password: nacos
protocols:
dubbo:
name: dubbo
port: 20000
provider:
services:
GreeterProvider:
interface: "" # read from pb
需要替换为自己使用的group namespace等,启动server,我们可以看到这里注册成功了
注意,我们这里改用的dubbo协议后原来的client是无法调用成功的
多协议支持
protocols:
dubbo:
name: dubbo
port: 20000
triple:
name: tri
port: 20002
client也改成20002 在triple协议上使用,这样就都可以了