解决RabbitMQ发送数据为空字符串

import org.springframework.amqp.core.AmqpTemplate;

错误的发送方式
fireTemplate.convertAndSend(fireCRTEvent)

fireTemplate.convertAndSend(JSON.toJSONString(fireCRTEvent));
或者自己重写toString方法
fireTemplate.convertAndSend(fireCRTEvent.toString());

猜你喜欢

转载自blog.csdn.net/xyjincan/article/details/70194728