class FileUploadExceptionAdvice {
	

	private static final Logger log = LoggerFactory.getLogger(FileUploadExceptionAdvice.class);
    
    @ExceptionHandler(MaxUploadSizeExceededException.class)
    @ResponseStatus(HttpStatus.PAYLOAD_TOO_LARGE)
    public @ResponseBody ErrorEntity handleFileException(Exception exception) {<FILL_FUNCTION_BODY>}

}

        log.error(exception.getMessage(), exception);
        ErrorEntity errorEntity = new ErrorEntity();

        String resultMessage = exception.getLocalizedMessage() != null ? exception.getLocalizedMessage() : exception.getMessage();
        Optional.ofNullable(resultMessage)
                .ifPresent(errorEntity::setMessage);
        return errorEntity;
    
<no_super_class>