spring 文件上传时遇到错误信息:
Servlet.service() for servlet [springmvc] in context with path [/**] threw exception [Required MultipartFile[] parameter 'photos' is not present] with root cause
org.springframework.web.bind.MissingServletRequestParameterException: Required MultipartFile[] parameter 'photos' is not present
用MultipartFile接收文件需增加配置:
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!--可设置上传文件大小限制,1024*200即200k-->
<property name="maxUploadSize" value="204800"/>
</bean>