@ControllerAdvice public class ResponseExceptionHandler extends Object
| 构造器和说明 |
|---|
ResponseExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.http.ResponseEntity<String> |
handleException(Exception e)
Handle other exception.
|
org.springframework.http.ResponseEntity<String> |
handleMissingParams(org.springframework.web.bind.MissingServletRequestParameterException ex)
Handle missing request parameter exception.
|
org.springframework.http.ResponseEntity<String> |
handleNacosException(NacosException e)
Handle
NacosException. |
org.springframework.http.ResponseEntity<String> |
handleParameterError(IllegalArgumentException ex)
Handle
IllegalArgumentException. |
@ExceptionHandler(value=com.alibaba.nacos.api.exception.NacosException.class) public org.springframework.http.ResponseEntity<String> handleNacosException(NacosException e)
NacosException.e - NacosException@ExceptionHandler(value=java.lang.IllegalArgumentException.class) public org.springframework.http.ResponseEntity<String> handleParameterError(IllegalArgumentException ex)
IllegalArgumentException.ex - IllegalArgumentException@ExceptionHandler(value=org.springframework.web.bind.MissingServletRequestParameterException.class) public org.springframework.http.ResponseEntity<String> handleMissingParams(org.springframework.web.bind.MissingServletRequestParameterException ex)
ex - MissingServletRequestParameterException@ExceptionHandler(value=java.lang.Exception.class) public org.springframework.http.ResponseEntity<String> handleException(Exception e)
e - other exceptionCopyright © 2018–2022 Alibaba Group. All rights reserved.