师兄你好: 在 order-server里运行 test方法 报错
我用的是 springboot 是2.3.8.RELEASE cloud是Hoxton.SR10,
项目其他部分都升级OK了,而且 product 里也能用amqpTemplate发送消息到rabbit,就是到order里 amqpTemplate 无法运行报错,下面是 mqSenderTest 报的部分异常信息。请辛苦帮我看下咋回事
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘mqSenderTest’: Unsatisfied dependency expressed through field ‘amqpTemplate’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.amqp.core.AmqpTemplate’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
SpringCloud组件实现微服务,【已升级Finchley.Release】
了解课程