mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-05 08:57:12 +08:00
完善:发版前配置梳理
This commit is contained in:
@@ -52,6 +52,7 @@ import top.charles7c.cnadmin.common.util.holder.LogContextHolder;
|
||||
* 全局异常处理器
|
||||
*
|
||||
* @author Charles7c
|
||||
* @author Lion Li(RuoYi-Vue-Plus)
|
||||
* @since 2022/12/21 21:01
|
||||
*/
|
||||
@Slf4j
|
||||
@@ -183,7 +184,6 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(NotLoginException.class)
|
||||
public R handleNotLoginException(NotLoginException e, HttpServletRequest request) {
|
||||
log.error("请求地址 [{}],认证失败,无法访问系统资源。", request.getRequestURI(), e);
|
||||
|
||||
String errorMsg;
|
||||
switch (e.getType()) {
|
||||
case NotLoginException.KICK_OUT:
|
||||
@@ -196,7 +196,6 @@ public class GlobalExceptionHandler {
|
||||
errorMsg = "登录状态已过期,请重新登录";
|
||||
break;
|
||||
}
|
||||
|
||||
LogContextHolder.setErrorMsg(errorMsg);
|
||||
return R.fail(HttpStatus.UNAUTHORIZED.value(), errorMsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user