我试图将HTML返回到我的Spring MVC控制器时遇到了一个问题.
它看起来像这样:
@RequestMapping(value = QUESTION_GROUP_CREATE_URL, method = RequestMethod.POST)
public
@ResponseBody
String createQuestionGroup(@RequestBody JsonQuestionGroup questionGroup, HttpServletResponse response) {
// questionGroup - this comes OK.
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
return "
}
我的Spring配置:
json=application/json
xml=application/xml
html=application/html
我看到firebug响应就像:{"String":"