我在尝试将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
我看到萤火虫的响应即将来临:{"String":"