标签:bsp 捕获异常 全局 put lob ase pack hand exception
/** * 全局捕获异常 */ @ControllerAdvice(basePackages = "com.liangjian.controller")//扫包范围 public class GlobalExceptionHandler { @ExceptionHandler(RuntimeException.class) @ResponseBody public Map<String, Object> exceptionHandler() { Map<String, Object> map = new HashMap<String, Object>(); map.put("errorCode", "500"); map.put("errorMsg", "系統错误!"); return map; } }
标签:bsp 捕获异常 全局 put lob ase pack hand exception
原文地址:https://www.cnblogs.com/castlechen/p/11145074.html