错误:
org.springframework.amqp.rabbit.support.ListenerExecutionFailedException: Listener threw exception
Caused by: org.springframework.amqp.support.converter.MessageConversionException: Failed to convert Message content
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of xxx
org.springframework.amqp.AmqpRejectAndDontRequeueException: Error Handler converted exception to fatal
原因:
因为在Bean对象中只有全参构造,没有无参构造
加上无参构造就解决了
public Student() { }
public Student(String name, String age, String gender) {
this.name = name;
this.age = age;
this.gender = gender;
}
版权声明:本文为weixin_44216706原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。