Class MaxUploadSizeExceededException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.web.multipart.MultipartException
org.springframework.web.multipart.MaxUploadSizeExceededException
- All Implemented Interfaces:
- Serializable, ErrorResponse
MultipartException subclass thrown when an upload exceeds the
maximum upload size allowed.
- Since:
- 1.0.1
- Author:
- Juergen Hoeller, Sebastien Deleuze
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface ErrorResponseErrorResponse.Builder, ErrorResponse.Interceptor
- 
Constructor SummaryConstructorsConstructorDescriptionMaxUploadSizeExceededException(long maxUploadSize) Constructor for MaxUploadSizeExceededException.MaxUploadSizeExceededException(long maxUploadSize, @Nullable Throwable ex) Constructor for MaxUploadSizeExceededException.
- 
Method SummaryModifier and TypeMethodDescriptiongetBody()Return the body for the response, formatted as an RFC 9457ProblemDetailwhosestatusshould match the response status.longReturn the maximum upload size allowed, or -1 if the size limit isn't known.Return the HTTP status code to use for the response.Methods inherited from class NestedRuntimeExceptioncontains, getMostSpecificCause, getRootCauseMethods inherited from class ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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, getDetailMessageArguments, getDetailMessageCode, getHeaders, getTitleMessageCode, getTypeMessageCode, updateAndGetBody
- 
Constructor Details- 
MaxUploadSizeExceededExceptionpublic MaxUploadSizeExceededException(long maxUploadSize) Constructor for MaxUploadSizeExceededException.- Parameters:
- maxUploadSize- the maximum upload size allowed, or -1 if the size limit isn't known
 
- 
MaxUploadSizeExceededException
 
- 
- 
Method Details- 
getMaxUploadSizepublic long getMaxUploadSize()Return the maximum upload size allowed, or -1 if the size limit isn't known.
- 
getStatusCodeDescription copied from interface:ErrorResponseReturn the HTTP status code to use for the response.- Specified by:
- getStatusCodein interface- ErrorResponse
 
- 
getBodyDescription copied from interface:ErrorResponseReturn the body for the response, formatted as an RFC 9457ProblemDetailwhosestatusshould match the response status.Note: The returned ProblemDetailmay be updated before the response is rendered, for example, viaErrorResponse.updateAndGetBody(MessageSource, Locale). Therefore, implementing methods should use an instance field, and should not re-create theProblemDetailon every call, nor use a static variable.- Specified by:
- getBodyin interface- ErrorResponse
 
 
-