请在下面找到我的控制器代码。
[HKEY_CURRENT_USER\Software\Michael Herf\flux\Preferences]
"fullscreendisable"=dword:00000001
请求数据类:
@RequestMapping(value = "/reconrangesummary", method=RequestMethod.POST, produces=MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public String getReconRangeSummaryReport(@RequestBody RequestData requestData){
logger.info("Inside Interest Service Controller - getReconRangeSummaryReport");
List<ReconRangeSummaryDetails> reconRangeSummaryDetails = new ArrayList<ReconRangeSummaryDetails>();
DashboardRequestDetails requestDetails = AccountUtils.convertRequest(requestData);
reconRangeSummaryDetails = accountService.getReconRangeSummaryDetails(requestDetails);
logger.info("Exit Interest Service Controller - getReconRangeSummaryReport");
return new Gson().toJson(reconRangeSummaryDetails);
}
我正在使用 POST方法和content-type:application / json 在邮递员中传递以下请求。
public class RequestData {
private String role;
private String branchCode;
private String circle;
private String requestDate;
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getBranchCode() {
return branchCode;
}
public void setBranchCode(String branchCode) {
this.branchCode = branchCode;
}
public String getCircle() {
return circle;
}
public void setCircle(String circle) {
this.circle = circle;
}
public String getRequestDate() {
return requestDate;
}
public void setRequestDate(String requestDate) {
this.requestDate = requestDate;
}
但是我收到如下错误响应。
HTTP状态415
服务器拒绝了此请求,因为请求实体的格式不受请求方法()的请求资源支持。