Class NoResourceFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.servlet.resource.NoResourceFoundException
- All Implemented Interfaces:
Serializable, org.springframework.web.ErrorResponse
public class NoResourceFoundException
extends jakarta.servlet.ServletException
implements org.springframework.web.ErrorResponse
Raised when
ResourceHttpRequestHandler can not find a resource.- Since:
- 6.1
- Author:
- Rossen Stoyanchev
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.web.ErrorResponse
org.springframework.web.ErrorResponse.Builder, org.springframework.web.ErrorResponse.Interceptor -
Constructor Summary
ConstructorsConstructorDescriptionNoResourceFoundException(org.springframework.http.HttpMethod httpMethod, String requestUri, String resourcePath) Create an instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ProblemDetailgetBody()org.springframework.http.HttpMethodReturn the HTTP method for the request.Return the path used to locate the resource.org.springframework.http.HttpStatusCodeMethods inherited from class jakarta.servlet.ServletException
getRootCauseMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.web.ErrorResponse
getDetailMessageArguments, getDetailMessageArguments, getDetailMessageCode, getHeaders, getTitleMessageCode, getTypeMessageCode, updateAndGetBody
-
Constructor Details
-
NoResourceFoundException
-
-
Method Details
-
getHttpMethod
public org.springframework.http.HttpMethod getHttpMethod()Return the HTTP method for the request. -
getResourcePath
-
getStatusCode
public org.springframework.http.HttpStatusCode getStatusCode()- Specified by:
getStatusCodein interfaceorg.springframework.web.ErrorResponse
-
getBody
public org.springframework.http.ProblemDetail getBody()- Specified by:
getBodyin interfaceorg.springframework.web.ErrorResponse
-