我知道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