-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
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
seata xid can't transmit if use httpclient #2862
Comments
Wish your reply, thanks |
Refer to code as blow: public class MyInterceptor implements RequestInterceptor {
@Override
public void apply(RequestTemplate requestTemplate) {
String xid = RequestContextHolder.getRequestAttributes().getRequest().getHeader("xid");
requestTemplate.header("xid", xid);
}
} RequestContextHolder is a threadlocal class based on Spring Web Context. You need to pay attention to async scene, that means threadlocal value will be lost with async scene |
This issue has been open 30 days with no activity. This will be closed in 7 days. |
This issue has been automatically marked as stale because it hasn't had any recent activity.If you think this should still be open, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. Thank you for your interest and contribution to the Sping Cloud Alibaba Community. |
具体描述:引入httpclient组件后seata无法透传xid
源码表现为Feign调用不会进入SeataFeignClient类的execute方法
把httpclient组件依赖去除掉之后可以正常透传
材料
The text was updated successfully, but these errors were encountered: