一、’RocketMQAutoConfiguration’ not loaded
    1、报错背景:收到任务,把websocket项目重构到另外一个项目,重构完成之后,开始报错,报错如下:
    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
    2、解决方案:1:查看RocketMQAutoConfiguration类,找到该代码
    @ConditionalOnProperty(
    prefix = “rocketmq”,
    value = {“name-server”},
    matchIfMissing = true
    )
    再yml里面查看是否按此格式配的,有的版本是rockmq:nameServer,注意格式
    2:查看maven中是否导入rocketmq jar包,有时候添加了依赖,但是因为idea缓存问题导致未读取到,可以刷新pom文件,或者点击file-invalidate caches,或者使用命令mvn clean install -U 清除缓存