We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务实现端一直报如下错误: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 49 path $.participantId
The text was updated successfully, but these errors were encountered:
找到原因了: 1、服务消费端会在拦截器中将事务信息存到request的header中,如下 public class HmilyFeignInterceptor implements RequestInterceptor {
@Override public void apply(final RequestTemplate requestTemplate) { RpcMediator.getInstance().transmit(requestTemplate::header, HmilyContextHolder.get()); }
} 2、高版本的RestTemplate.headers会将事务(json字符串)信息截取,导致服务接收端解析json格式失败 {"transId":-5821096666862862336,"participantId":-5821096650890952704,"action":1,"role":1,"transType":"TCC"} 截取成{"transId":-5821096666862862336,"participantId} 存到header的“_HMILY_TRANSACTION_CONTEXT”中
考虑降低springcloud的版本或者重写这个拦截器
Sorry, something went wrong.
No branches or pull requests
服务实现端一直报如下错误:
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 49 path $.participantId
The text was updated successfully, but these errors were encountered: