I wrote some code in Springboot application.properties:
spring.http.multipart.max-file-size=1024KB
spring.http.multipart.max-request-size=1024KB
An exception occurs when the uploaded file is larger than the set value:
org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException:the request was rejected because.......
I want to capture this exception and display the custom format, what should I do?