我知道 spring 3.2 确实将 json 转换为带有 RequestBody 注释的对象列表。它不适合我。我可以使用常规的杰克逊对象映射器来做到这一点。只是检查是否有人可以帮助我.. 下面是我的 json 和控制器方法
[{"uniqueJqGridId":"1","fileProcessingDate":"2012-09-24","createdTimeStamp":"1348569180191","csoCode":"A-A ","cycleDate":"2012-09-24","accountDate":"2012-10-02","originName":"NCAA ","amount":"-95996.33","policyNumber":"C ","transactionCode":"PCH","id":"1"}]
@RequestMapping(method = RequestMethod.POST, value = "/washTransactions", headers="Content-Type=application/json")
public @ResponseBody RequestStatus washTransactions(@RequestBody List<ReconPolicy> policiesToWash)throws Exception{
reconciliationService.applyWashToTransactions(policiesToWash,getCurrentUser());
return new RequestStatus(true);
}