到目前为止,我发现的最好方法是:
@RequestMapping(value = "/greeting", method = POST, consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE)@ResponseBodypublic String greetingJson(HttpEntity<String> httpEntity) { String json = httpEntity.getBody(); // json contains the plain json string让我知道是否还有其他选择。



