mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
完成 [记住我]模式 开发文档
This commit is contained in:
@@ -14,7 +14,6 @@ import com.pj.util.AjaxJson;
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.exception.NotPermissionException;
|
||||
import cn.dev33.satoken.exception.NotRoleException;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
/**
|
||||
* 全局异常处理
|
||||
@@ -25,7 +24,7 @@ public class GlobalException {
|
||||
// 在当前类每个方法进入之前触发的操作
|
||||
@ModelAttribute
|
||||
public void get(HttpServletRequest request) throws IOException {
|
||||
StpUtil.checkPermission("user:add");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -246,9 +246,10 @@ public class TestController {
|
||||
// StpUtil.getTokenSession().logout();
|
||||
// StpUtil.logoutByLoginId(10001);
|
||||
// StpUtil.setLoginId(10001);
|
||||
// StpUtil.setLoginId(10001, new SaLoginModel().setIsTempCookie(true));
|
||||
// StpUtil.setLoginId(10001, false);
|
||||
// StpUtil.getLoginId();
|
||||
|
||||
// StpUtil.setLoginId(10001);
|
||||
// StpUtil.getTokenSession();
|
||||
return AjaxJson.getSuccess("访问成功");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user