@RestControllerAdvice public class GlobalExceptionHandler extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private static org.slf4j.Logger |
log |
| 构造器和说明 |
|---|
GlobalExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.http.ResponseEntity<Object> |
bizException(com.alibaba.cola.exception.BizException exception) |
org.springframework.http.ResponseEntity<Object> |
illegalArgumentException(Exception exception)
参数异常
|
org.springframework.http.ResponseEntity<Object> |
servletRequestBindingException(org.springframework.web.bind.ServletRequestBindingException exception) |
org.springframework.http.ResponseEntity<Object> |
sysException(com.alibaba.cola.exception.SysException exception) |
@ExceptionHandler(value=com.alibaba.cola.exception.SysException.class) public org.springframework.http.ResponseEntity<Object> sysException(com.alibaba.cola.exception.SysException exception)
@ExceptionHandler(value=com.alibaba.cola.exception.BizException.class) public org.springframework.http.ResponseEntity<Object> bizException(com.alibaba.cola.exception.BizException exception)
@ExceptionHandler(value={java.lang.IllegalArgumentException.class,com.fasterxml.jackson.core.JacksonException.class,org.springframework.core.NestedRuntimeException.class})
public org.springframework.http.ResponseEntity<Object> illegalArgumentException(Exception exception)
exception - @ExceptionHandler(value=org.springframework.web.bind.ServletRequestBindingException.class) public org.springframework.http.ResponseEntity<Object> servletRequestBindingException(org.springframework.web.bind.ServletRequestBindingException exception)
Copyright © 2024. All rights reserved.