【问题描述】
PAS6.5将springboot应用部署到应用服务器后,上传文件时报错:
Caused by: org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: Request.getParts is called without multipart configuration. Either add a @MultipartConfig to the servlet, or a multipart-config element to web.xml
【解决方案】
项目中解决方案:项目中对上传文件有自己的实现,不使用springboot默认的解析器。修改 springboot 启动类的注解配置:@SpringBootApplication(exclude = {MultipartAutoConfiguration.class})
【原文链接】
http://doc.primeton.com/pages/viewpage.action?pageId=44139962