一、该问题的重现步骤是什么?
1. 2.4.0升级2.5.1后
2. 原来的feign接口(用kafka做的一个消息中心,此接口是生成消息提交给kafka供消费者消费)
R MessageProducerVO convertMessageVo
MessageProducerVO MessageProducer = List ListStringString Long Boolean String String
远程调用的时候没用到父类的属性,只有用到如下信息
MessageProducerVO producer = MessageProducerVOproducer.setTopicQueueproducer.setMessageTypeKafkaMsgTypeEnum..ordinalproducer.setSendGroupidList.sendTopicproducer
升级过过后 feign接口接收不到提交的数据
报错如下
2020-09-07 09:34:41.723 DEBUG 14072 --- [ XNIO-1 task-20] .c.c.v.BladeRequestMappingHandlerMapping : Mapped to public org.springblade.core.tool.api.R cn.jzcloud.message.feign.MessageClient.sendTopic(cn.jzcloud.message.vo.MessageProducerVO)
2020-09-07 09:34:42.220 ERROR 14072 --- [ XNIO-1 task-20] o.s.c.log.error.RestExceptionTranslator : 消息不能读取:JSON parse error: Unexpected character ('\' (code 92)): was expecting comma to separate Object entries; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Unexpected character ('\' (code 92)): was expecting comma to separate Object entries
at [Source: (PushbackInputStream); line: 1, column: 1100] (through reference chain: cn.jzcloud.message.vo.MessageProducerVO["sendGroup"]->java.util.ArrayList[0])
3.
二、你期待的结果是什么?实际看到的又是什么?
目前服务器上回退到2.4.0的版本能正常生产消息 2.4.0 一次成功调用 的日志如下
================ Request Start ================
===> POST: /client/send_topic Parameters: {"convertMessageVo":{"id":null,"createUser":null,"createDept":null,"createTime":null,"updateUser":null,"updateTime":null,"status":null,"isDeleted":null,"tenantId":null,"templateId":null,"channelId":null,"channelName":null,"message":null,"phone":null,"weChatId":null,"successType":null,"title":null,"messageType":0,"sendType":null,"sendUser":null,"sendAppId":null,"parentSign":null,"failCause":null,"groupType":null,"sendGroup":[{"id":"1302790214144466946","createUser":null,"createDept":null,"createTime":"2020-09-07 10:06:06","updateUser":null,"updateTime":null,"status":null,"isDeleted":null,"source":"速新闻","releaseTime":"2020-09-07 10:01:00","releaseDateTime":null,"releaseDate":"2020-09-07","attribute":null,"region":"230000000000,231100000000","originalLink":"http://www.suxinwen.cn/news/1842939","content":"受降雨影响,水利部门预计辽宁省辽河、浑河、太子河,吉林省第二松花江,黑龙江省嫩江、松花江等河流将出现明显涨水过程,其中辽河上游、嫩江中下游、第二松花江下游、松花江干流等主要江河可能发生超警洪水,暴雨区内部分河流可能发生较大洪水。","taskId":null,"collectionSource":"sina","summary":null,"score":0,"relevance":0,"similarDocsNum":null,"oriId":"15296960","mediaType":"新闻","title":" 做好防汛工作!今年第10号台风“海神”来了","userName":"新华视点微博","authorId":null,"transferContent":"
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
四、请提供详细的错误堆栈信息,这很重要。
五、若有更多详细信息,请在下面提供。
@FeignClient(
value = AppConstant.APPLICATION_DESK_NAME
)
public interface INoticeClient {
String API_PREFIX = "/client";
String TOP = API_PREFIX + "/top";
String JSON = API_PREFIX + "/json";
/**
* 获取notice列表
*
* @param number
* @return
*/
@GetMapping(TOP)
R> top(@RequestParam("number") Integer number);
/**
*
* @param producer
* @return
*/
@PostMapping(JSON)
R json(@RequestBody MessageProducerVO producer);
}
@ApiIgnore()
@RestController
@AllArgsConstructor
public class NoticeClient implements INoticeClient {
private final NoticeMapper mapper;
@Override
@GetMapping(TOP)
public R> top(Integer number) {
return R.data(mapper.topList(number));
}
@Override
@PostMapping(JSON)
public R json(@RequestBody MessageProducerVO producer){
System.out.println(JsonUtil.toJson(producer));
return R.data(producer);
}
}
经仔细排查发现,2.5.1解析不了如下字符串 原2.4.0可以
""其他黑龙江省,嫩江市,黑河市 暴雨,台风,发生
原请求数据json如下:
{"id":null,"createUser":null,"createDept":null,"createTime":null,"updateUser":null,"updateTime":null,"status":null,"isDeleted":null,"tenantId":null,"templateId":null,"channelId":null,"channelName":null,"message":null,"phone":null,"weChatId":null,"successType":null,"title":null,"messageType":0,"sendType":null,"sendUser":null,"sendAppId":null,"parentSign":null,"failCause":null,"groupType":null,"sendGroup":[{"id":"1302790214144466946","createUser":null,"createDept":null,"createTime":"2020-09-07 10:06:06","updateUser":null,"updateTime":null,"status":null,"isDeleted":null,"source":"速新闻","releaseTime":"2020-09-07 10:01:00","releaseDateTime":null,"releaseDate":"2020-09-07","attribute":null,"region":"230000000000,231100000000","originalLink":"http://www.suxinwen.cn/news/1842939","content":"受降雨影响,水利部门预计辽宁省辽河、浑河、太子河,吉林省第二松花江,黑龙江省嫩江、松花江等河流将出现明显涨水过程,其中辽河上游、嫩江中下游、第二松花江下游、松花江干流等主要江河可能发生超警洪水,暴雨区内部分河流可能发生较大洪水。","taskId":null,"collectionSource":"sina","summary":null,"score":0,"relevance":0,"similarDocsNum":null,"oriId":"15296960","mediaType":"新闻","title":" 做好防汛工作!今年第10号台风“海神”来了","userName":"新华视点微博","authorId":null,"transferContent":"其他黑龙江省,嫩江市,黑河市 暴雨,台风,发生
- 热议问题
- 将所有访问接口的请求,都保存到数据库日志表blade_log_usual或blade_log_api中 1
- nacos服务分组名称 1
- Saber2怎么跳转到Saber3 1
- 聚合文档中调试没有相关header参数的填写 1
- 开源版的blade-swagger工程被移除了吗 1
- 加上全局处理异常后,错误日志就不会自动入库的问题吗 1
- 图片在minio,怎么设置图片需要授权才能访问,比如一些身份证图片图片地址,不能直接访问 1
- cloud如何获取登录用户信息 1
- 登录之后页面莫名其妙出现报错 1
- 协议转换脚本问题 1
官方新品扫一扫访问 Blade技术社区 移动端