Bean method rocketMQTemplate in RocketMQAutoConfiguration not loaded坑
阿新 • • 發佈:2019-09-11
一、 異常棧
*************************** APPLICATION FAILED TO START *************************** Description: A component required a bean of type 'org.apache.rocketmq.spring.core.RocketMQTemplate' that could not be found. The following candidates were found but could not be injected: - Bean method 'rocketMQTemplate' in 'RocketMQAutoConfiguration' not loaded because @ConditionalOnBean (types: org.apache.rocketmq.client.producer.DefaultMQProducer; SearchStrategy: all) did not find any beans of type org.apache.rocketmq.client.producer.DefaultMQProducer Action: Consider revisiting the entries above or defining a bean of type 'org.apache.rocketmq.spring.core.RocketMQTemplate' in your configuration.
追蹤到是DefaultMQProducer配置問題
二、 開啟RocketMQAutoConfiguration
配置生效需要設定rocketmq.producer.group
屬性
在application.yml