Package org.springframework.web.bind
Class MissingServletRequestParameterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.util.NestedServletException
org.springframework.web.bind.ServletRequestBindingException
org.springframework.web.bind.MissingRequestValueException
org.springframework.web.bind.MissingServletRequestParameterException
- All Implemented Interfaces:
Serializable
ServletRequestBindingException
subclass that indicates a missing parameter.- Since:
- 2.0.2
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionMissingServletRequestParameterException
(String parameterName, String parameterType) Constructor for MissingServletRequestParameterException.MissingServletRequestParameterException
(String parameterName, String parameterType, boolean missingAfterConversion) Constructor for use when a value was present but converted tonull
. -
Method Summary
Methods inherited from class org.springframework.web.bind.MissingRequestValueException
isMissingAfterConversion
Methods inherited from class jakarta.servlet.ServletException
getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MissingServletRequestParameterException
Constructor for MissingServletRequestParameterException.- Parameters:
parameterName
- the name of the missing parameterparameterType
- the expected type of the missing parameter
-
MissingServletRequestParameterException
public MissingServletRequestParameterException(String parameterName, String parameterType, boolean missingAfterConversion) Constructor for use when a value was present but converted tonull
.- Parameters:
parameterName
- the name of the missing parameterparameterType
- the expected type of the missing parametermissingAfterConversion
- whether the value became null after conversion- Since:
- 5.3.6
-
-
Method Details
-
getMessage
Description copied from class:NestedServletException
Return the detail message, including the message from the nested exception if there is one.- Overrides:
getMessage
in classNestedServletException
-
getParameterName
Return the name of the offending parameter. -
getParameterType
Return the expected type of the offending parameter.
-