练习用ajax上传文件,后端spring来接收,一直各种毛病啊
报错 org.springframework.web.HttpMediaTypeNotSupportedException:
Content type 'multipart/form-data' not supported
我也不懂啊,就在前端contextType各种改改改,
它也只是变着法的告诉我not supported
它到底支持个啥?
练习用ajax上传文件,后端spring来接收,一直各种毛病啊
报错 org.springframework.web.HttpMediaTypeNotSupportedException:
Content type 'multipart/form-data' not supported
我也不懂啊,就在前端contextType各种改改改,
它也只是变着法的告诉我not supported
它到底支持个啥?
那要想在后端的作为@ResponseBody的MultipartFile接收到数据
前端的$.ajax中的contentType属性要怎么改?