类 ResponseExceptionHandler
- java.lang.Object
-
- com.alibaba.nacos.naming.exception.ResponseExceptionHandler
-
@ControllerAdvice public class ResponseExceptionHandler extends java.lang.ObjectResponse exception handler.- 作者:
- nkorange
-
-
构造器概要
构造器 构造器 说明 ResponseExceptionHandler()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.springframework.http.ResponseEntity<java.lang.String>handleException(java.lang.Exception e)Handle other exception.org.springframework.http.ResponseEntity<java.lang.String>handleMissingParams(org.springframework.web.bind.MissingServletRequestParameterException ex)Handle missing request parameter exception.org.springframework.http.ResponseEntity<java.lang.String>handleNacosException(com.alibaba.nacos.api.exception.NacosException e)HandleNacosException.org.springframework.http.ResponseEntity<java.lang.String>handleParameterError(java.lang.IllegalArgumentException ex)HandleIllegalArgumentException.
-
-
-
方法详细资料
-
handleNacosException
@ExceptionHandler(com.alibaba.nacos.api.exception.NacosException.class) public org.springframework.http.ResponseEntity<java.lang.String> handleNacosException(com.alibaba.nacos.api.exception.NacosException e)
HandleNacosException.- 参数:
e- NacosException- 返回:
- ResponseEntity
-
handleParameterError
@ExceptionHandler(java.lang.IllegalArgumentException.class) public org.springframework.http.ResponseEntity<java.lang.String> handleParameterError(java.lang.IllegalArgumentException ex)
HandleIllegalArgumentException.- 参数:
ex- IllegalArgumentException- 返回:
- ResponseEntity
-
handleMissingParams
@ExceptionHandler(org.springframework.web.bind.MissingServletRequestParameterException.class) public org.springframework.http.ResponseEntity<java.lang.String> handleMissingParams(org.springframework.web.bind.MissingServletRequestParameterException ex)
Handle missing request parameter exception.- 参数:
ex-MissingServletRequestParameterException- 返回:
- ResponseEntity
-
handleException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<java.lang.String> handleException(java.lang.Exception e)
Handle other exception.- 参数:
e- other exception- 返回:
- ResponseEntity
-
-