返回的json都报这个错
ProductManagerForm form = (ProductManagerForm) getBaseForm(context);
FormFile attachFile=form.getAttachFile();
if(attachFile.getFileSize()>10*1024*1024){
String result = "{\"message\":\"failed\"}";
context.getResponse().setContentType("application/json;charset=UTF-8");
context.getResponse().getWriter().write(result);
context.getResponse().getWriter().close();
}else{
String result ="{\"message\":\"success\"}";
context.getResponse().setContentType("application/json;charset=UTF-8");
context.getResponse().getWriter().write(result);
context.getResponse().getWriter().close();
}
为什么总是报这个问题Resource interpreted as Document but transferred with MIME type application/json
------解决方案--------------------你都不看问题报出来的意思,很明显是你文件的格式问题