springboot项目 Feign调用时,@RequestBody 接受字符串(String),json字符串多出引号

12次阅读
没有评论

今天对外提供接口,接口如下

springboot项目 Feign调用时,@RequestBody 接受字符串(String),json字符串多出引号

springboot项目 Feign调用时,@RequestBody 接受字符串(String),json字符串多出引号

 

打印结果如下:  =======mapAlarmVo======JSONObject.toJSONString(mapAlarmVo)=======“{“policeId”:”d8e749914fb84492a338a58794f7d098″,”personTypeName”:”嫌疑人”,”sCaseCode”:”210220112240000″,”alarmTypeName”:”无人看管”,”orgId”:”a9d44acdb3d0481f84a1431c24f6772f”,”sCreateUser”:”admin”,”dtUpdateTime”:1613974757773,”policeNameNo”:”进程21001″,”sDescribe”:”测试无人看管”,”policeName”:”进程2″,”id”:”a69c8572-d30b-400e-9252-7c021567ba41″,”personType”:”0″,”sAlarmSourceId”:”623c9aa78355435f87c381ae877a41e4″,”verifiedFlg”:”0″,”alarmTime”:1613974627000,”policeNo”:”1001″,”dtCreateTime”:1613974757773,”sUpdateUser”:”admin”,”sStandBookId”:”108604e0bc8449279a322997cac2479d”,”alarmArea”:””,”personName”:”测试”,”alarmType”:”100522″,”alarmAreaName”:””,”personId”:”623c9aa78355435f87c381ae877a41e4″,”sAlarmSourceName”:”测试”,”sAlarmWeight”:”20″} “

收到消息体多了个引号。

 

产生原因可以看下面这个博客:

https://blog.csdn.net/libertine1993/article/details/107339706

正文完
 0