I have a very simple file upload set up with Spring Boot. I was wondering if there was an easy way to display an error page when the maximum file size is exceeded.
I
Multipart request parsing happens before a handler is selected and hence there is no @Controller and therefore no @ControllerAdvice to speak of yet. You can use an ErrorController (see http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-web-applications.html#boot-features-error-handling) for that.
BTW you don't need @RequestParam. It's enough that the argument type is MultipartFile.