mirror of
https://gitee.com/dromara/sa-token.git
synced 2024-12-03 20:37:53 +08:00
fix:优化传递token bug
This commit is contained in:
parent
25cdfc3e55
commit
2c20e7baa0
@ -32,8 +32,13 @@ public class SaTokenDubboConsumerFilter implements Filter {
|
||||
RpcContext.getContext().setAttachment(SaIdUtil.ID_TOKEN, SaIdUtil.getToken());
|
||||
}
|
||||
|
||||
// 1. 调用前,向下传递会话Token
|
||||
RpcContext.getContext().setAttachment(SaTokenConsts.JUST_CREATED, StpUtil.getTokenValueNotCut());
|
||||
// 1. 调用前,向下传递会话Token
|
||||
String tokenValueNotCut = null;
|
||||
try {
|
||||
tokenValueNotCut = StpUtil.getTokenValueNotCut();
|
||||
} finally {
|
||||
RpcContext.getContext().setAttachment(SaTokenConsts.JUST_CREATED, tokenValueNotCut);
|
||||
}
|
||||
|
||||
// 2. 开始调用
|
||||
Result invoke = invoker.invoke(invocation);
|
||||
|
Loading…
Reference in New Issue
Block a user