@RestControllerAdvice public class AllControllerAdvice { @ExceptionHandler(Exception.class) public ReturnBean exceptionHandler(Exception e){ e.printStackTrace(); return ReturnBean.ofReturnBean(false,e.getMessage()); } }
springboot全局异常处理
最新推荐文章于 2023-10-10 16:51:19 发布