摘要: 全局异常处理流程 自定义业务状态码枚举类,规范状态码 封装返回对象例如Result 自定义异常类BusinessException,这类异常是可预见性的,直接手动throw异常抛出就可以捕获到,优先级最高 全局异常处理器@RestControllerAdvice 这套方案能够在异常处理器里面精确处理 阅读全文
posted @ 2025-12-29 23:06 Huangyien 阅读(14) 评论(0) 推荐(0)
摘要: class Solution { public List<List<Integer>> threeSum(int[] nums) { Arrays.sort(nums); List<List<Integer>> ans = new ArrayList<>(); int n = nums.length 阅读全文
posted @ 2025-12-29 16:33 Huangyien 阅读(7) 评论(0) 推荐(0)