mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
fix(core): 修复 StpUtil.setTokenValue("xxx"); 方法 loginModel.getIsWriteHeader() 空指针的问题。 fixes #IBKSM0
This commit is contained in:
@@ -190,7 +190,7 @@ public class StpLogic {
|
|||||||
*/
|
*/
|
||||||
public void setTokenValue(String tokenValue, SaLoginModel loginModel){
|
public void setTokenValue(String tokenValue, SaLoginModel loginModel){
|
||||||
|
|
||||||
// 先判断一下,如果提供 token 为空,则不执行任何动作
|
// 先判断一下,如果提供 token 为空,则不执行任何动作 .
|
||||||
if(SaFoxUtil.isEmpty(tokenValue)) {
|
if(SaFoxUtil.isEmpty(tokenValue)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ public class TestController {
|
|||||||
@RequestMapping("test")
|
@RequestMapping("test")
|
||||||
public SaResult test() {
|
public SaResult test() {
|
||||||
System.out.println("------------进来了 " + SaFoxUtil.formatDate(new Date()));
|
System.out.println("------------进来了 " + SaFoxUtil.formatDate(new Date()));
|
||||||
StpUtil.getLoginId();
|
// StpUtil.getLoginId();
|
||||||
|
// StpUtil.getAnonTokenSession();
|
||||||
|
StpUtil.setTokenValue("xxx");
|
||||||
// 返回
|
// 返回
|
||||||
return SaResult.data(null);
|
return SaResult.data(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user