mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-04-29 11:41:25 +08:00
[重磅更新] 升级 dubbo 3.0 使用原生 starter 整合 减少与 feign 的无用兼容配置
This commit is contained in:
@@ -30,12 +30,12 @@ public class SaTokenDubboConsumerFilter implements Filter {
|
||||
|
||||
// 追加 Id-Token 参数
|
||||
if(SaManager.getConfig().getCheckIdToken()) {
|
||||
RpcContext.getContext().setAttachment(SaIdUtil.ID_TOKEN, SaIdUtil.getToken());
|
||||
RpcContext.getServiceContext().setAttachment(SaIdUtil.ID_TOKEN, SaIdUtil.getToken());
|
||||
}
|
||||
|
||||
// 1. 调用前,向下传递会话Token
|
||||
if(SaManager.getSaTokenContextOrSecond() != SaTokenContextDefaultImpl.defaultContext) {
|
||||
RpcContext.getContext().setAttachment(SaTokenConsts.JUST_CREATED, StpUtil.getTokenValueNotCut());
|
||||
RpcContext.getServiceContext().setAttachment(SaTokenConsts.JUST_CREATED, StpUtil.getTokenValueNotCut());
|
||||
}
|
||||
|
||||
// 2. 开始调用
|
||||
|
||||
@@ -27,7 +27,7 @@ public class DubboRequestFilter implements Filter {
|
||||
return invoker.invoke(invocation);
|
||||
}
|
||||
String client = CommonConstants.PROVIDER;
|
||||
if (RpcContext.getContext().isConsumerSide()) {
|
||||
if (RpcContext.getServiceContext().isConsumerSide()) {
|
||||
client = CommonConstants.CONSUMER;
|
||||
}
|
||||
String baselog = "Client[" + client + "],InterfaceName=[" + invocation.getInvoker().getInterface().getSimpleName() + "],MethodName=[" + invocation.getMethodName() + "]";
|
||||
|
||||
Reference in New Issue
Block a user