public class MissingPathVariableException extends MissingRequestValueException
ServletRequestBindingException subclass that indicates that a path
variable expected in the method parameters of an @RequestMapping
method is not present among the URI variables extracted from the URL.
Typically that means the URI template does not match the path variable name
declared on the method parameter.MissingMatrixVariableException,
Serialized Form| Constructor and Description |
|---|
MissingPathVariableException(String variableName,
MethodParameter parameter)
Constructor for MissingPathVariableException.
|
MissingPathVariableException(String variableName,
MethodParameter parameter,
boolean missingAfterConversion)
Constructor for use when a value was present but converted to
null. |
| Modifier and Type | Method and Description |
|---|---|
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 path variable.
|
String |
getVariableName()
Return the expected name of the path variable.
|
isMissingAfterConversiongetRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic MissingPathVariableException(String variableName, MethodParameter parameter)
variableName - the name of the missing path variableparameter - the method parameterpublic MissingPathVariableException(String variableName, MethodParameter parameter, boolean missingAfterConversion)
null.variableName - the name of the missing path variableparameter - the method parametermissingAfterConversion - whether the value became null after conversionpublic String getMessage()
NestedServletExceptiongetMessage in class NestedServletExceptionpublic final String getVariableName()
public final MethodParameter getParameter()