Expected MultipartHttpServletRequest: is a MultipartResolver configured?

出现这种异常就是在配置spring mvc文件上传解析器时id名不是 multipartResolver
<!--文件上传解析器 id 为 multipartResolver-->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="UTF-8"/>
<property name="maxUploadSize" value="5242880"/>
</bean>

posted @ 2019-11-15 23:08  文所未闻  阅读(382)  评论(0编辑  收藏  举报