|
@@ -1,6 +1,7 @@
|
|
|
package com.xy.utils;
|
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
+import cn.hutool.core.lang.Console;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
@@ -71,6 +72,7 @@ public class AuthorizeUtils {
|
|
|
public static String getToken() {
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
String token = request.getHeader(CommConsts.TOKEN_NAME);
|
|
|
+ Console.log(token);
|
|
|
if (StringUtils.isEmpty(token)) {
|
|
|
throw new CommRuntimeException(SaTokenEnum.NO_LOGIN.getKey(), SaTokenEnum.NO_LOGIN.getName());
|
|
|
}
|