如何解决 klov -Extent 报告中的 FileSizeLimitExceededException
How to solve FileSizeLimitExceededException in klov -Extent report
当我尝试将屏幕截图添加到 klov 报告时,捕获到此异常。
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException: The field f exceeds its maximum permitted size of 1048576 bytes.] with root cause
org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException:
The field f exceeds its maximum permitted size of 1048576 bytes.
并且我在 windows machine 中使用 klov0.1.1 和 extentreports-3.1.5 .
(在 mac 中工作的相同配置)
我在网上搜索后,将这些行放在 application.properties 中。但这也没有用。
spring.multipart.max-file-size=30MB
spring.multipart.max-request-size=30MB
如有任何帮助,我们将不胜感激。提前致谢。
此配置可以从 application.properties
文件执行,因为它是 Spring 引导配置驱动程序。看看这是否有帮助:
当我尝试将屏幕截图添加到 klov 报告时,捕获到此异常。
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException: The field f exceeds its maximum permitted size of 1048576 bytes.] with root cause
org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException: The field f exceeds its maximum permitted size of 1048576 bytes.
并且我在 windows machine 中使用 klov0.1.1 和 extentreports-3.1.5 . (在 mac 中工作的相同配置)
我在网上搜索后,将这些行放在 application.properties 中。但这也没有用。
spring.multipart.max-file-size=30MB
spring.multipart.max-request-size=30MB
如有任何帮助,我们将不胜感激。提前致谢。
此配置可以从 application.properties
文件执行,因为它是 Spring 引导配置驱动程序。看看这是否有帮助: