jwt token中获取loginType通过loginType获取StpLogic

This commit is contained in:
binarypursuer 2025-04-03 00:03:47 +08:00
parent 897b1d9215
commit 1094408ea5

View File

@ -52,7 +52,7 @@ public class JwtSaManager {
* @date 2025/4/2
* @since 1.0
**/
public StpLogic getStpLogic(String tokenName) {
public static StpLogic getStpLogic(String tokenName) {
// 获取当前请求的token
String token = SaHolder.getRequest().getHeader(tokenName);
// 判断token是否为空
@ -81,7 +81,7 @@ public class JwtSaManager {
* @date 2025/4/2
* @since 1.0
**/
public StpLogic getStpLogic() {
public static StpLogic getStpLogic() {
return getStpLogic(StpUtil.getTokenName());
}
}