|
@@ -47,6 +47,16 @@ public class GlobalExceptionHandler {
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SERVER_FAILURE, "Access is denied!");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * 服务器错误异常统一处理
|
|
|
+ */
|
|
|
+ @ExceptionHandler(RuntimeException.class)
|
|
|
+ @ResponseBody
|
|
|
+ public ResponseBodyVO<Object> handleRuntimeException(RuntimeException e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SERVER_FAILURE, e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* 服务器错误异常统一处理
|
|
|
*/
|