背景
dubbo3是今年新推出的革命性版本,之前使用过dubbo2,对dubbo3比较好奇,今天就初次尝鲜。本次项目架构:
- springboot 基础脚手架
- dubbo3 核心服务框架
- nacos 注册中心
- protobuf 传输协议
问题
按照官方文档教程编写,customer端运行时报以下错误信息:
Caused by: java.lang.IllegalArgumentException: This serialization only supports google protobuf objects, current object class is: java.lang.String
at org.apache.dubbo.common.serialize.protobuf.support.GenericProtobufObjectOutput.writeObject(GenericProtobufObjectOutput.java:115)
at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.encodeRequestData(DubboCodec.java:207)
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:259)
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:71)
at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:47)
at org.apache.dubbo.remoting.transport.n