返回的json都报这个错,该怎么解决

返回的json都报这个错ProductManagerForm form (ProductManagerForm) getBaseForm(context)FormFile at

返回的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
[解决办法]
你都不看问题报出来的意思,很明显是你文件的格式问题