我知道spring 3.2会将json转换为带有RequestBody注解的对象列表。它不适合我。我可以使用常规的Jackson对象映射器来完成它。只是检查是否有人可以帮助我..下面是我的JSON和控制器方法Spring 3.2 Jackson2(400坏请求)
[{"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);
}
thx,你解决了我很多时间。 – hiway 2014-04-16 04:22:32