@RestControllerAdvice
@ConditionalOnProperty(prefix="rest",
name="enable-exception-handler",
havingValue="true",
matchIfMissing=true)
public class RestExceptionHandlerAdvice
extends Object
| 构造器和说明 |
|---|
RestExceptionHandlerAdvice(RestWebProperties restWebProperties) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.http.ResponseEntity<RestWebResultContainer> |
exception(Exception exception,
org.springframework.web.context.request.WebRequest request) |
org.springframework.http.ResponseEntity<RestWebResultContainer> |
httpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException exception,
org.springframework.web.context.request.WebRequest request) |
org.springframework.http.ResponseEntity<RestWebResultContainer> |
httpRequestMethodNotSupported(org.springframework.web.HttpRequestMethodNotSupportedException exception,
org.springframework.web.context.request.WebRequest request) |
org.springframework.http.ResponseEntity<RestWebResultContainer> |
interceptException(InterceptException exception,
org.springframework.web.context.request.WebRequest request) |
org.springframework.http.ResponseEntity<RestWebResultContainer> |
missingServletRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException exception,
org.springframework.web.context.request.WebRequest request) |
org.springframework.http.ResponseEntity<RestWebResultContainer> |
noHandlerFoundException(org.springframework.web.servlet.NoHandlerFoundException exception,
org.springframework.web.context.request.WebRequest request) |
public RestExceptionHandlerAdvice(RestWebProperties restWebProperties)
@ExceptionHandler(value=org.springframework.web.HttpRequestMethodNotSupportedException.class) public org.springframework.http.ResponseEntity<RestWebResultContainer> httpRequestMethodNotSupported(org.springframework.web.HttpRequestMethodNotSupportedException exception, org.springframework.web.context.request.WebRequest request)
@ExceptionHandler(value=org.springframework.web.servlet.NoHandlerFoundException.class) public org.springframework.http.ResponseEntity<RestWebResultContainer> noHandlerFoundException(org.springframework.web.servlet.NoHandlerFoundException exception, org.springframework.web.context.request.WebRequest request)
@ExceptionHandler(value=org.springframework.web.bind.MissingServletRequestParameterException.class) public org.springframework.http.ResponseEntity<RestWebResultContainer> missingServletRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException exception, org.springframework.web.context.request.WebRequest request)
@ExceptionHandler(value=org.springframework.http.converter.HttpMessageNotReadableException.class) public org.springframework.http.ResponseEntity<RestWebResultContainer> httpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException exception, org.springframework.web.context.request.WebRequest request)
@ExceptionHandler(value=InterceptException.class) public org.springframework.http.ResponseEntity<RestWebResultContainer> interceptException(InterceptException exception, org.springframework.web.context.request.WebRequest request)
@ExceptionHandler(value=java.lang.Exception.class) public org.springframework.http.ResponseEntity<RestWebResultContainer> exception(Exception exception, org.springframework.web.context.request.WebRequest request)
Copyright © 2018. All rights reserved.