Commit 65fcea86 by fz

1.异常捕获处理

1 parent d0ef2ed0
...@@ -6,6 +6,7 @@ import org.springframework.validation.BindException; ...@@ -6,6 +6,7 @@ import org.springframework.validation.BindException;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.ServletRequestBindingException; import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/** /**
* <p>Description: * <p>Description:
...@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler; ...@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
* @deprecated 抛出异常,让上游服务捕获信息 * @deprecated 抛出异常,让上游服务捕获信息
*/ */
@Slf4j @Slf4j
//@RestControllerAdvice @RestControllerAdvice
@Deprecated @Deprecated
public class GlobalExceptionHandler { public class GlobalExceptionHandler {
@ExceptionHandler({BusinessException.class}) @ExceptionHandler({BusinessException.class})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!