提交 9301faab authored 作者: 李秋林's avatar 李秋林

捕获未登录异常

上级 c80fe4eb
......@@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletRequest;
import com.sfa.common.core.domain.R;
import com.sfa.common.core.exception.*;
import com.sfa.common.core.exception.auth.NotLoginException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.BindException;
......@@ -180,6 +181,14 @@ public class GlobalExceptionHandler
{
return R.fail(e.getCode(),e.getMsg());
}
/**
* 登录异常
*/
@ExceptionHandler(NotLoginException.class)
public R handleNotLoginException(NotLoginException e)
{
return R.fail(e.getCode(),e.getMsg());
}
/**
* 全局异常
*/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论