学习使用谷歌浏览器:Network中选择对应的网络请求,会有对应的Headers、Response、Preview、Timing的信息。

  1. header的信息:主要是表头信息(General、Respose Headers、Request Headers、Request Payload)如图所示Request Payload是前台传递后台的参数。
  2. Preview:也可以查看传递的参数
  3. Response:可以查看传递给后台的状态(成功(参数以及成功的代码代号)或者失败(还可以查看失败原因以及传递参数、失败代码号))eg:成功的如下:{"metadata":{"requestId":null,"requestType":null,"url":null},"data":{"activityId":"310920609242550272","activityName":"当当","activityType":2,"userNum":0,"timeFlag":1,"startDate":"20161103","endDate":"20161104","activityStatusId":"4","comments":"测算过","isValid":1,"createUser":"创建人1","createTime":null,"modifyUser":null,"modifyTime":null},"statusCode":201}          失败的如下:{"code":400,"message":"\n### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1\n### The error may involve com.asiainfodata.perec.activity.mapper.OperpConfMapper.insertList-Inline\n### The error occurred while setting parameters\n### SQL: INSERT INTO OPERP_CONF_INFO  ( activity_id,channel_id,operp_id,rec_position,scene_priority,scene_id )  VALUES\n### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1\n; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1","error":["You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"]}。具体图片如下:以上便于前端和java联调时,定位联调错误的原因。
posted on 2016-11-01 15:22  qinbb  阅读(1413)  评论(0编辑  收藏  举报