feat: SaLoginParameter 支持配置 isShare

This commit is contained in:
click33
2025-03-02 01:25:14 +08:00
parent 16cf2db334
commit 3bc9e88645
5 changed files with 35 additions and 8 deletions

View File

@@ -26,7 +26,10 @@ public class TestController {
// 测试登录 ---- http://localhost:8081/test/login
@RequestMapping("login")
public SaResult login(@RequestParam(defaultValue = "10001") long id) {
StpUtil.login(id, new SaLoginParameter().setIsConcurrent(true));
StpUtil.login(id, new SaLoginParameter()
.setIsConcurrent(true)
.setIsShare(false)
);
return SaResult.ok("登录成功");
}