记一次RabbitMQ,使用Jackson反序列化的报错;
报错:
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `[B` out of START_OBJECT token
at [Source: (String)"{"id":1,"userName":"jack","name":"lili"}"; line: 1, column: 1]
先上代码:
RabbitMQ的配置类就不上了,基本配置
生产者:
消费者:
分析
还是没找到原因,主要应该是反序列化失败,我修改了监听端的参数,接收Message对象,手动getBody,就可以接收到数据;
有大佬知道的,请指正,感谢!