public class MissingRequestHeaderException extends ServletRequestBindingException
ServletRequestBindingException
subclass that indicates
that a request header expected in the method parameters of an
@RequestMapping
method is not present.MissingRequestCookieException
,
Serialized FormConstructor and Description |
---|
MissingRequestHeaderException(String headerName,
MethodParameter parameter)
Constructor for MissingRequestHeaderException.
|
Modifier and Type | Method and Description |
---|---|
String |
getHeaderName()
Return the expected name of the request header.
|
String |
getMessage()
Return the detail message, including the message from the nested exception
if there is one.
|
MethodParameter |
getParameter()
Return the method parameter bound to the request header.
|
getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MissingRequestHeaderException(String headerName, MethodParameter parameter)
headerName
- the name of the missing request headerparameter
- the method parameterpublic String getMessage()
NestedServletException
getMessage
in class NestedServletException
public final String getHeaderName()
public final MethodParameter getParameter()