40c853a1
Liu Haoyu
去掉MySQL相关内容, 去掉my...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package com.objecteye.handle;
import com.objecteye.common.CommonResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import javax.servlet.http.HttpServletRequest;
@RestControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(value = Exception.class)
public CommonResult globalExceptionHandler(HttpServletRequest httpServletRequest, Exception e) {
return CommonResult.success(504, e.getMessage(), "");
}
}
|