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(java.lang.String headerName,
MethodParameter parameter)
Constructor for MissingRequestHeaderException.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHeaderName()
Return the expected name of the request header.
|
java.lang.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
public MissingRequestHeaderException(java.lang.String headerName, MethodParameter parameter)
headerName
- the name of the missing request headerparameter
- the method parameterpublic java.lang.String getMessage()
NestedServletException
getMessage
in class NestedServletException
public final java.lang.String getHeaderName()
public final MethodParameter getParameter()