diff --git a/src/main/java/com/loafle/commons/rpc/protocol/grpc/GRPCServerRequestCodec.java b/src/main/java/com/loafle/commons/rpc/protocol/grpc/GRPCServerRequestCodec.java index 601d205..99d524d 100644 --- a/src/main/java/com/loafle/commons/rpc/protocol/grpc/GRPCServerRequestCodec.java +++ b/src/main/java/com/loafle/commons/rpc/protocol/grpc/GRPCServerRequestCodec.java @@ -48,6 +48,11 @@ class GRPCServerRequestCodec implements RPCRegistryCodec { Type paramType = paramTypes[i]; String param = this.params.get(i).toStringUtf8(); + if (paramType.equals(String.class)) { + result[i] = param; + continue; + } + result[i] = this.gson.fromJson(param, paramType); }