|
@@ -5,6 +5,7 @@ import com.shawn.model.entity.TAdmin;
|
|
|
import com.shawn.service.interfac.TAdminServiceInterface;
|
|
|
import com.shawn.util.JavaWebToken;
|
|
|
import com.shawn.web.exception.MyException;
|
|
|
+import com.shawn.web.exception.UnLoginException;
|
|
|
import lombok.extern.apachecommons.CommonsLog;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.commons.lang3.time.StopWatch;
|
|
@@ -16,6 +17,7 @@ import org.aspectj.lang.annotation.Aspect;
|
|
|
import org.aspectj.lang.annotation.Before;
|
|
|
import org.aspectj.lang.annotation.Pointcut;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.context.request.RequestAttributes;
|
|
|
import org.springframework.web.context.request.RequestContextHolder;
|
|
@@ -50,7 +52,6 @@ public class PerformanceMonitor {
|
|
|
String token = null!=request.getHeader("token")?request.getHeader("token"):"";
|
|
|
boolean isLogin = true;
|
|
|
if(StringUtils.isEmpty(token)){
|
|
|
- // TODO 做token的逻辑判断
|
|
|
isLogin = false;
|
|
|
}else{
|
|
|
Map<String, Object> map = JavaWebToken.parserJavaWebToken(token);
|
|
@@ -64,9 +65,9 @@ public class PerformanceMonitor {
|
|
|
}
|
|
|
}
|
|
|
if(!isLogin){
|
|
|
- throw new MyException("请登录");
|
|
|
+ throw new UnLoginException("请登录");
|
|
|
}
|
|
|
-// throw new MyException("请登录");
|
|
|
+// throw new UnLoginException("请登录");
|
|
|
}
|
|
|
|
|
|
}
|