我从Spring 3.1迁移到Spring 3.2.5。在迁移到Spring 3.2.5之前,当我更新我的库时,我的一些其他调用正在返回400错误请求。Spring MVC 3.2 Jackson Bad Request
这里的方法
@RequestMapping(value = AJAX_SEARCH_MED)
@ResponseBody
DataTablesAjaxResponse<ActiveMedicationView> ajaxSearchActiveMedication(
@PathVariable(PATH_PIN) String pin,
@RequestBody DataTablesAjaxRequest request);
我已经配置了我的MVC:注释本
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<!-- Turn off working out content type based on URL file extension, should fall back to looking at the Accept headers -->
<property name="favorPathExtension" value="false" />
</bean>
在我的POM
。我有这个杰克逊编组库
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.10</version>
</dependency>
但是,当从数据表进行调用时,我总是收到一个错误的请求。
代码调用该方法
$('#prescriptionsTable').dataTable({
"bProcessing":true,
"bServerSide":true,
"bFilter":false,
"sAjaxSource":"/cms/ajax/patient/2012010000000009/active-medication.html",
"aoColumnDefs":[ //Other configurations here
首先,将您的日志转为调试,看看Spring说了些什么。 –
向我们显示完整请求周期的日志。 –
你能告诉我们代码调用这个API,也是方法的全部,所以我们可以看到什么正在处理和返回 – Aeseir