Handling MultipartException with Spring Boot and display error page
问题 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 have uploaded a very simple example of what I'm trying to achieve on github. Basically, the idea is to catch the MultipartException in a global Spring exception handler: @ControllerAdvice public class UploadExceptionHandler { @ExceptionHandler(MultipartException.class) public ModelAndView handleError(MultipartException exception)