我使用了brpc-java的最新版starlight写了一个很简单的demo
public interface UserService {
Long getUser(@RequestParam("userId") Long userId);
}
写了protoc文件
syntax = "proto3";
package com.example.demo_0313.service;
message UserRequest {
int64 userId = 1;
}
message UserResponse {
int64 userId = 1;
}
service UserService {
rpc getUser (UserRequest) returns (UserResponse) {}
}
然后导入之后,无论是使用json格式,还是meta-data均报错
ERROR:13 xxxxxxxxxx : Protoc Error
请教该如何处理?
我通过Client代码调用是可以调用成功的
服务端控制台日志输出:
2023-03-15 16:42:47.648 WARN 33586 --- [ star-s-nio-3-4] c.b.cloud.starlight.api.utils.LogUtils : Record server access log error, cause by null
2023-03-15 16:42:47.649 WARN 33586 --- [ star-s-nio-3-4] c.b.c.s.transport.netty.DecoderHandler : Decode header with the byteBuf failed: side SERVER, remoteAddr 127.0.0.1:60582, recvMsgTime 1678869767622, size 200, the last exception is Error occur when use SpringRestHttpDecoder to reverseConvertRequest: No handler found for PRI *.
2023-03-15 16:42:47.652 WARN 33586 --- [ star-s-nio-3-4] c.b.c.s.transport.netty.DecoderHandler : Decode header with the byteBuf failed: side SERVER, remoteAddr 127.0.0.1:60582, recvMsgTime 1678869767651, size 17, the last exception is Body size is bigger than 512m or less than 1, maybe not bytes of stargate.
2023-03-15 16:42:47.657 INFO 33586 --- [ star-s-nio-3-4] c.b.c.s.transport.netty.RpcHandler : Server Channel is closing, channelId b0be83fffe0167f6-00008332-0000001c-42e31c53fea2e5b6-7ed15c70, remoteAddress /127.0.0.1:60582
目前支持的是grpc~我反馈一下咱们需求