我调用了一个 rabbitmq 队列,它返回一个 json 有效负载。
<inSequence>
<call>
<endpoint>
<address statistics="enable" trace="enable" uri="rabbitmq:/AMQPProducerSample?rabbitmq.server.host.name=10.0.0.2&rabbitmq.server.port=5672&rabbitmq.server.virtual.host=dev&rabbitmq.server.vhost=devAuth&rabbitmq.queue.name=hello&rabbitmq.queue.durable=false&rabbitmq.queue.auto.ack=true&rabbitmq.queue.exclusive=false&rabbitmq.replyto.name=false">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>-1</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
</call>
<header name="Content-Type" scope="transport" value="application/json"/>
<respond description="respond whatever"/>
</inSequence>
但是当队列的答案返回时,控制台显示: [2020-10-19 19:20:39,741] WARN {RabbitMQUtils} - Unable to determine content type for message urn:uuid:88BF095D7137B387921603153239744 setting to text/plain
并将“文本”添加到我已经 json 有效负载中: {“text”:“{“jwt”:“5f8e2d21c2184”,“error”:false}“}
如何将 rabbitmq 的答案设置为 json,还是需要转换该答案?因为它得到所有条形保护。