启动消费者时RabbitListener报错
2018-09-06 15:41:15.867 WARN 13880 --- [cTaskExecutor-1] s.a.r.l.ConditionalRejectingErrorHandler : Execution of Rabbit message listener failed.
org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener method could not be invoked with the incoming message
Endpoint handler details:
Method [public void com.ecdata.core.rabbitMQ.TopicReceiver.receiveMessage(com.ecdata.model.RabbitMQ.MQMessage,java.util.Map<java.lang.String, java.lang.Object>,com.rabbitmq.client.Channel)]
Bean [com.ecdata.core.rabbitMQ.TopicReceiver@308e465b]
Caused by: org.springframework.messaging.handler.annotation.support.MethodArgumentNotValidException: Could not resolve method parameter at index 0 in public void com.ecdata.core.rabbitMQ.TopicReceiver.receiveMessage(com.ecdata.model.RabbitMQ.MQMessage,java.util.Map<java.lang.String, java.lang.Object>,com.rabbitmq.client.Channel): 1 error(s): [Error in object 'message': codes []; arguments []; default message [Payload value must not be empty]]
这里说错误原因是Payload value must not be empty,但是启动消费者时payload肯定是空啊,不知道怎么解决