| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.auth.NotLoginException; |
| | | import com.ruoyi.common.core.exception.user.UserAppletException; |
| | | import org.apache.commons.fileupload.FileUploadBase; |
| | | import org.slf4j.Logger; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 没有登录异常 |
| | | * @param e |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @ExceptionHandler(NotLoginException.class) |
| | | public AjaxResult notLoginException(NotLoginException e, HttpServletRequest request) { |
| | | String requestURI = request.getRequestURI(); |
| | | log.error("请求地址'{}',登录校验失败'{}'", requestURI, e.getMessage()); |
| | | return AjaxResult.error(HttpStatus.UNAUTHORIZED, e.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 请求方式不支持 |
| | | */ |
| | | @ExceptionHandler(HttpRequestMethodNotSupportedException.class) |