接口拦截 日志打印 自定义异常输出
This commit is contained in:
@@ -65,7 +65,8 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = BadRequestException.class)
|
||||
public ResponseEntity<ApiError> badRequestException(BadRequestException e) {
|
||||
// 打印堆栈信息
|
||||
log.error(ThrowableUtil.getStackTrace(e));
|
||||
// log.error(ThrowableUtil.getStackTrace(e));
|
||||
log.error(e.getMessage());
|
||||
return buildResponseEntity(ApiError.error(e.getStatus(),e.getMessage()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user