类 MissingPathVariableException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- javax.servlet.ServletException
- org.springframework.web.util.NestedServletException
- org.springframework.web.bind.ServletRequestBindingException
- org.springframework.web.bind.MissingPathVariableException
- 所有已实现的接口:
Serializable
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.- 从以下版本开始:
- 4.2
- 作者:
- Rossen Stoyanchev
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 MissingPathVariableException(String variableName, MethodParameter parameter)
Constructor for MissingPathVariableException.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 javax.servlet.ServletException
getRootCause
构造器详细资料
MissingPathVariableException
public MissingPathVariableException(String variableName, MethodParameter parameter)
Constructor for MissingPathVariableException.- 参数:
variableName
- the name of the missing path variableparameter
- the method parameter
方法详细资料
getMessage
public String getMessage()
从类复制的说明:NestedServletException
Return the detail message, including the message from the nested exception if there is one.- 覆盖:
getMessage
在类中NestedServletException
getVariableName
public final String getVariableName()
Return the expected name of the path variable.
getParameter
public final MethodParameter getParameter()
Return the method parameter bound to the path variable.