手掌心
@RequestMapping("updateHead")public void updateHead(HttpServletRequest request, HttpServletResponse response) throws Exception {//转换成multi 。。。。MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;//获取文件表单CommonsMultipartFile file = (CommonsMultipartFile) multipartRequest.getFile("headFile");//。。。}这个是需要在spring中配置的文件上传视图解析器<bean id="multipartResolver"class="org.springframework.web.multipart.commons.CommonsMultipartResolver"><!--1024*1024*100即100M--><property name="maxUploadSize" value="104857600" /></bean>