@RabbitListener( bindings = @QueueBinding( value = @Queue(value = "order-queue", durable = "true"), exchange = @Exchange(value = "order-exchange", durable = "true", type = "topic"), key = "order.*" ) )
借楼补充一下, 未以后可能踩坑的朋友说一下 一定记得加@Component注解 让Spring容器实例化该类, 否则也不会自动创建队列.
springboot的启动入口放错位置了,应该放在项目外,多了一层包结构,导致创建,监听,消费等一系列操作失败