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