dromara / dromara/Sa-Token

使用 @SaCheckPermission注解接口,接口的返回值是 同步DeferredResult,报错 SaTokenContext 上下文尚未初始化

Open
#797 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
19k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

### 对以下问题有疑问:

接口返回总是 SaTokenContext 上下文尚未初始化,之前sa-token版本没问题,更新到 1.42.0问题出现了

![Image](https://github.com/user-attachments/assets/c03f5727-22d1-45b3-aed4-a70dbaa5183d)

![Image](https://github.com/user-attachments/assets/cb3d20fe-b77e-48fc-99ef-6f31798590ab)

< 备注:请尽量详细描述问题所在 >

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the @SaCheckPermission endpoint that returns a synchronous DeferredResult and compare its behavior before and after upgrading to version 1.42.0. Trace where the SaTokenContext is accessed during the DeferredResult flow; done means the endpoint returns successfully without the context-not-initialized error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authorization, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.