类 HandlerNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cn.taketoday.core.NestedRuntimeException
cn.taketoday.web.InfraConfigurationException
cn.taketoday.web.handler.HandlerNotFoundException
- 所有已实现的接口:
HttpStatusCodeProvider,ErrorResponse,Serializable
By default when the DispatcherHandler can't find a handler for a request it
sends a 404 response. However if its property "throwExceptionIfNoHandlerFound"
is set to
true this exception is raised and may be handled with
a configured HandlerExceptionHandler.- 从以下版本开始:
- 4.0 2022/1/28 23:19
- 作者:
- Brian Clozel, Harry Yang
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final ProblemDetailprivate final Stringprivate final HttpHeadersprivate final Stringprivate static final long -
构造器概要
构造器构造器说明HandlerNotFoundException(String httpMethod, String requestURI, HttpHeaders headers) Constructor for HandlerNotFoundException. -
方法概要
修饰符和类型方法说明getBody()Return the body for the response, formatted as an RFC 7807ProblemDetailwhosestatusshould match the response status.Return the headers of the request.Return the HTTP status code to use for the response.从类继承的方法 cn.taketoday.core.NestedRuntimeException
contains, getMostSpecificCause, getNestedMessage, getRootCause从类继承的方法 java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 cn.taketoday.web.ErrorResponse
getHeaders
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
httpMethod
-
requestURI
-
requestHeaders
-
body
-
-
构造器详细资料
-
HandlerNotFoundException
Constructor for HandlerNotFoundException.- 参数:
httpMethod- the HTTP methodrequestURI- the HTTP request URIheaders- the HTTP request headers
-
-
方法详细资料
-
getStatusCode
从接口复制的说明:ErrorResponseReturn the HTTP status code to use for the response.- 指定者:
getStatusCode在接口中ErrorResponse- 指定者:
getStatusCode在接口中HttpStatusCodeProvider- 覆盖:
getStatusCode在类中InfraConfigurationException
-
getHttpMethod
-
getRequestURI
-
getRequestHeaders
Return the headers of the request. -
getBody
从接口复制的说明:ErrorResponseReturn the body for the response, formatted as an RFC 7807ProblemDetailwhosestatusshould match the response status.- 指定者:
getBody在接口中ErrorResponse- 覆盖:
getBody在类中InfraConfigurationException
-