public class MissingPathVariableException extends ServletRequestBindingException
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.Modifier and Type | Field and Description |
---|---|
private MethodParameter |
parameter |
private java.lang.String |
variableName |
Constructor and Description |
---|
MissingPathVariableException(java.lang.String variableName,
MethodParameter parameter)
Constructor for MissingPathVariableException.
|
Modifier and Type | Method and Description |
---|---|
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 path variable.
|
java.lang.String |
getVariableName()
Return the expected name of the path variable.
|
private final java.lang.String variableName
private final MethodParameter parameter
public MissingPathVariableException(java.lang.String variableName, MethodParameter parameter)
variableName
- the name of the missing path variableparameter
- the method parameterpublic java.lang.String getMessage()
NestedServletException
getMessage
in class NestedServletException
public final java.lang.String getVariableName()
public final MethodParameter getParameter()