Class MissingServletRequestParameterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.bind.ServletRequestBindingException
org.springframework.web.bind.MissingRequestValueException
org.springframework.web.bind.MissingServletRequestParameterException
- All Implemented Interfaces:
- Serializable, ErrorResponse
ServletRequestBindingException subclass that indicates a missing parameter.- Since:
- 2.0.2
- Author:
- Juergen Hoeller
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface ErrorResponseErrorResponse.Builder, ErrorResponse.Interceptor
- 
Constructor SummaryConstructorsConstructorDescriptionMissingServletRequestParameterException(String parameterName, String parameterType) Constructor for MissingServletRequestParameterException.MissingServletRequestParameterException(String parameterName, MethodParameter parameter, boolean missingAfterConversion) Constructor with aMethodParameterinstead of a String parameterType.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the targetMethodParameterif the exception was raised for a controller method argument.final StringReturn the name of the offending parameter.final StringReturn the expected type of the offending parameter.Methods inherited from class MissingRequestValueExceptionisMissingAfterConversionMethods inherited from class ServletRequestBindingExceptiongetBody, getDetailMessageArguments, getDetailMessageCode, getStatusCodeMethods inherited from class jakarta.servlet.ServletExceptiongetRootCauseMethods inherited from class ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ErrorResponsegetDetailMessageArguments, getHeaders, getTitleMessageCode, getTypeMessageCode, updateAndGetBody
- 
Constructor Details- 
MissingServletRequestParameterException
- 
MissingServletRequestParameterExceptionpublic MissingServletRequestParameterException(String parameterName, MethodParameter parameter, boolean missingAfterConversion) Constructor with aMethodParameterinstead of a String parameterType.- Parameters:
- parameterName- the name of the missing parameter
- parameter- the target method parameter for the missing value
- missingAfterConversion- whether the value became null after conversion
- Since:
- 6.1
 
 
- 
- 
Method Details- 
getMessage- Overrides:
- getMessagein class- Throwable
 
- 
getParameterNameReturn the name of the offending parameter.
- 
getParameterTypeReturn the expected type of the offending parameter.
- 
getMethodParameterReturn the targetMethodParameterif the exception was raised for a controller method argument.- Since:
- 6.1
 
 
-