@RequestMapping(value = "updateInvestorApplyAccountNo", method = RequestMethod.POST)
@ResponseBody
public void updateInvestorApplyAccountNo(HttpServletRequest request,
HttpServletResponse response,
@RequestBody String requestBody) {
int num = 0;
String result = "";
//下面是把拿到的json字符串转成 json对象
JSONObject jsStr = JSONObject.parseObject(requestBody); //将字符串{“id”:1}
//int jsID = Integer.parseInt(jsStr.getString("id"));//获取id的值
/**
* json对象转换成java对象
*/
InvestorApplyModel stud = (InvestorApplyModel) JSONObject.toJavaObject(jsStr,InvestorApplyModel.class);
}
喜欢本文的朋友们,欢迎关注微信公众号“Java面试达人”,收看更多精彩内容

本文介绍了一个用于更新投资者申请账户信息的RESTful API方法。通过POST请求,该方法接收JSON格式的请求体,将其解析为Java对象,并进行相应的业务处理。

193

被折叠的 条评论
为什么被折叠?



