package com.taiji.system.util; import com.taiji.system.enums.ResultStatusEnum; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.FieldError; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.context.request.WebRequest; import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; /*** *
* 全局异常处理 *
* @author hou yi * @date 2022/7/27 11:17 **/ @RestControllerAdvice @SuppressWarnings("all") public class GlobalExceptionHandle extends ResponseEntityExceptionHandler { @ExceptionHandler(RuntimeException.class) public ResultWrapper