![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
文章平均质量分 66
码小伟
这个作者很懒,什么都没留下…
展开
-
自定义异常
public class HrWrapException extends RuntimeException { private static final long serialVersionUID = 1L; private int errorCode; private String msg; public HrWrapException(int errorCode, String msg) { super(msg); this.er.原创 2021-11-17 18:19:09 · 68 阅读 · 0 评论 -
springboot全局异常处理
@ControllerAdvice@ResponseBody@Slf4jpublic class GlobalExceptionHandler { @ExceptionHandler(value = Exception.class) public Result<?> exceptionHandler(HttpServletRequest request, Exception e) { Result<?> result = new Result&.原创 2021-10-14 09:50:48 · 82 阅读 · 0 评论