Class MissingPathVariableException

  • All Implemented Interfaces:

    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.
    Rossen Stoyanchev
    See Also:
    MissingMatrixVariableException, Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MissingPathVariableException

        public MissingPathVariableException(java.lang.String variableName,
                                            MethodParameter parameter)
        Constructor for MissingPathVariableException.
        variableName - the name of the missing path variable
        parameter - the method parameter
    • Method Detail

      • getVariableName

        public final java.lang.String getVariableName()
        Return the expected name of the path variable.
      • getParameter

        public final MethodParameter getParameter()
        Return the method parameter bound to the path variable.