我正在生成RabbitMQ消息,其有效载荷为xml,并尝试在spring boot应用程序中作为对象使用。但这引发了异常。下面是异常的堆栈跟踪:
Caused by: org.springframework.amqp.support.converter.MessageConversionException:
Cannot handle message
... 13 more
Caused by: org.springframework.messaging.converter.MessageConversionException:
Could not read JSON: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: (byte[])"<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
nested exception is com.fasterxml.jackson.core.JsonParseException:
Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
我做了同样的事情来产生请求作为json负载,并在Spring Boot应用程序中作为对象使用。一切正常。
任何帮助都将不胜感激。