AmqpException: No method found for class [B
将@RabbitListener
注解标注在方法上面就可以在方法中捕捉到异常了
@Component
public class listener {
@RabbitListener(queues = "queue")
@RabbitHandler
public void produce(String msg) {
System.out.println("msg : " + msg);
}
}
网友评论