|
@@ -8,7 +8,6 @@ package com.platform.exception;
|
|
|
|
|
|
|
|
|
import com.platform.entity.Result;
|
|
|
-import com.platform.utils.R;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.util.StringUtils;
|
|
@@ -35,12 +34,4 @@ public class GlobalExceptionHandler {
|
|
|
return Result.failure(StringUtils.isEmpty(e.getCode()) ? Result.CODE_FAILURE : e.getCode(), e.getMsg());
|
|
|
}
|
|
|
|
|
|
- @ResponseBody
|
|
|
- @ExceptionHandler(RuntimeException.class)
|
|
|
- @ResponseStatus(HttpStatus.OK)
|
|
|
- public R runtimeExceptionHandler(HttpServletRequest request, RuntimeException e) {
|
|
|
- log.error(request.getRequestURI() + ":" + e.getMessage());
|
|
|
- return R.error(e.getMessage());
|
|
|
- }
|
|
|
-
|
|
|
}
|