【发布时间】:2013-08-30 04:45:44
【问题描述】:
我正在使用@Responsebody String 来发送 JSON。 我的部分代码如下。(对不起,我把它全部打开了)
@RequestMapping(value = "/getSomeList", method = RequestMethod.GET ,
headers="Accept=application/json", produces = "text/plain;charset=UTF-8")
public @ResponseBody String getThumbList(
@RequestParam("con_id") String con_id) throws Exception{
return json;
}
实际上它发送的是 Json。但我的客户要求 Bson 类型。如何在不编辑全局格式的情况下将 Json 更改为 Bson(我的 json 实际上只是字符串,我听说 spring 无法响应 bson。是吗?)。
【问题讨论】:
标签: json spring annotations response bson