叫用高代码后端, 后端有机会从header的token里面解析出用户id吗?
叫用高代码后端,后端有机会从header的token里面解析出用户id吗?
Map<String, Object> tProfile = DWServiceContext.getContext().getProfile();
tProfile可以取到一些人员相关讯息, 包括userId,userName,tenantId,tenantName,tenantSid
例如tProfile.get("userId")
注意不能在服务的interface加上@AllowAnonymous, 加了会取不到, 因为匿名调用就不会去解析呼叫人员
页:
[1]