关于webuploader + springmvc 出现的406问题

报406 Not acceptable 百思不得其解

最后参考http://blog.csdn.net/finalAmativeness/article/details/54668090 手写response解决,可能是@Responsebody自动映射出了什么问题。

@RequestMapping(value = "/certificate.htm", method = RequestMethod.POST)
    public void certificateUpload(HttpServletRequest request, HttpServletResponse response) throws Exception {
        User user = SecurityUserHolder.getCurrentUser();
        MultipartHttpServletRequest Murequest = (MultipartHttpServletRequest)request;
        Map files = Murequest.getFileMap();//得到文件map对象
        for (MultipartFile file : files.values()) {
            String originalFileName = file.getOriginalFilename();
            System.out.println(originalFileName);
        }
        response.getWriter().write("success");
}

你可能感兴趣的:(Exception,java,webuploader)